Direction Structure

Represents a direction or directional heading.

Definition

Namespace: InnerDrive.Geography
Assembly: InnerDrive.Geography (in InnerDrive.Geography.dll) Version: 5.2.9017.0
C#
[SerializableAttribute]
public struct Direction : IComparable, IComparable<Direction>, 
	IComparisonOperators<Direction, Direction, bool>, IEqualityOperators<Direction, Direction, bool>, 
	IEquatable<Direction>, IFormattable, IMinMaxValue<Direction>
Inheritance
Object    ValueType    Direction
Implements
IComparable, IComparableDirection, IEquatableDirection, IFormattable, IComparisonOperatorsDirection, Direction, Boolean, IEqualityOperatorsDirection, Direction, Boolean, IMinMaxValueDirection

Remarks

A direction is expressed numerically as degrees East of North. So a direction of 270 is due West, for example.

Constructors

Direction Creates a new instance of Direction with a floating point value.

Properties

CardinalAbbrv Gets the abbreviation of the cardinal direction represented by this directional vector.
CardinalName Gets the full name of the cardinal direction represented by this directional vector.
East Gets a new Direction equal to due East.
MaxValueGets the maximum value of the current type.
MinValueGets the minimum value of the current type.
North Gets a new Direction equal to due North.
South Gets a new Direction equal to due South.
Unknown Gets a Direction representing an unknown value.
Value Gets or sets the underlying value of the Direction.
West Gets a new Direction equal to due West.

Methods

CompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Equals(Direction)Indicates whether the current object is equal to another object of the same type.
Equals(Object)Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetCardinalAbbrv Returns the abbreviation of the cardinal direction represented by the directional vector.
GetCardinalName Returns the full name of the cardinal direction represented by the directional vector.
GetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns the fully qualified type name of this instance.
(Overrides ValueTypeToString)
ToString(IFormatProvider) Converts the numeric value of this instance to its equivalent String representation using the specified culture-specific format information.
ToString(String) Converts the numeric value of this instance to its equivalent String representation using the specified format.
ToString(String, IFormatProvider) Converts the numeric value of this instance to its equivalent String representation using the specified format and culture-specific format information.

Operators

Equality(Direction, Direction)Compares two values to determine equality.
(Direction to Int32) Returns a new Int32 value from a given Direction object.
(Int32 to Direction) Creates a new Direction object from a Int32 value.
GreaterThan(Direction, Direction)Compares two values to determine which is greater.
GreaterThanOrEqual(Direction, Direction)Compares two values to determine which is greater or equal.
(Direction to Double) Returns a new Double value from a given Direction object.
(Double to Direction) Creates a new Direction object from a Double value.
Inequality(Direction, Direction)Compares two values to determine inequality.
LessThan(Direction, Direction)Compares two values to determine which is less.
LessThanOrEqual(Direction, Direction)Compares two values to determine which is less or equal.

Explicit Interface Implementations

IComparableCompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

See Also