CoordinatePartTryParse(String, CoordinateType, CoordinatePart) Method

Attempts to parse a string into a CoordinatePart.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 2.21.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public static bool TryParse(
	string value,
	CoordinateType cType,
	out CoordinatePart coordinatePart
)

Parameters

value  String
CoordinatePart string
cType  CoordinateType
CoordinateType
coordinatePart  CoordinatePart
CoordinatePart object to populate

Return Value

Boolean
boolean

Example

The following example demonstrates how to parse a latitude from a string.
C#
CoordinatePart cp;
if(CoordinatePart.TryParse("-32.891º", CoordinateType.Long, out cp))
{
    Console.WriteLine(cp); //W 32º 53' 27.6"
}

See Also