MilitaryGridReferenceSystemTryParse(String, MilitaryGridReferenceSystem) Method

Attempts to parse a string into an MGRS coordinate.

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,
	out MilitaryGridReferenceSystem mgrs
)

Parameters

value  String
string
mgrs  MilitaryGridReferenceSystem
MilitaryGridReferenceSystem

Return Value

Boolean
MilitaryGridReferenceSystem

Example

The following example attempts to parse an MGRS coordinate set with the default WGS84 ellipsoid.
C#
MilitaryGridReferenceSystem mgrs;
if(!MilitaryGridReferenceSystem.TryParse("16U EA 00872 05009", out mgrs))
{
    Console.WriteLine(mgrs);//16U EA 00872 05009
}

See Also