Click or drag to resize

CoordinatePartTryParse Method (String, CoordinateType, CoordinatePart)

Attempts to parse a string into a CoordinatePart.

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public static bool TryParse(
	string value,
	CoordinateType cType,
	out CoordinatePart coordinatePart
)

Parameters

value
Type: SystemString
CoordinatePart string
cType
Type: CoordinateSharpCoordinateType
CoordinateType
coordinatePart
Type: CoordinateSharpCoordinatePart
CoordinatePart object to populate

Return Value

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