Table of Contents

Struct Position

Namespace
TZFinder
Assembly
TZFinder.dll

Represents a geographic position with longitude and latitude.

public readonly struct Position : IEquatable<Position>
Implements
Inherited Members

Constructors

Position(float, float)

Initializes a new instance of the Position struct.

public Position(float longitude, float latitude)

Parameters

longitude float

The longitude, in degrees. Must be between -180 and 180.

latitude float

The latitude, in degrees. Must be between -90 and 90.

Exceptions

ArgumentOutOfRangeException

Thrown when longitude or latitude is out of range or NaN.

Properties

Latitude

Gets the latitude of the position.

public float Latitude { get; }

Property Value

float

Longitude

Gets the longitude of the position.

public float Longitude { get; }

Property Value

float

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(Position)

Determines whether the specified Position is equal to the current Position.

public bool Equals(Position other)

Parameters

other Position

The Position to compare with the current Position.

Returns

bool

true if the specified Position is equal to the current Position; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(Position, Position)

Determines whether two specified Position instances are equal.

public static bool operator ==(Position left, Position right)

Parameters

left Position

The first Position to compare.

right Position

The second Position to compare.

Returns

bool

true if the two Position instances are equal; otherwise, false.

operator !=(Position, Position)

Determines whether two specified Position instances are not equal.

public static bool operator !=(Position left, Position right)

Parameters

left Position

The first Position to compare.

right Position

The second Position to compare.

Returns

bool

true if the two Position instances are not equal; otherwise, false.