Parses distance (in meters) from the provided string.
true - the function has succeeded, false - it has failed
The function verifies validity of the parsing result. The valid distance is a real number greater or equal to zero.
This sample shows how to call the Geodetic.ParseDistanceInM method from C# code:
string errorMessage = String.Empty;
string str = "78.5";
double distanceInM = Double.NaN;
if (Geodetic.ParseDistanceInM(str, out distanceInM, out errorMessage))
{
Console.WriteLine("Distance, in meters: " + distanceInDeg.ToString());
}
else
{
Console.WriteLine(errorMessage);
}