Parses bearing (in decimal degrees) from the provided string.
true - the function has succeeded, false - it has failed
The function verifies validity of its arguments and the parsing result. The valid precision is an integer number in the range from 0 (inclusive) to 15 (inclusive). The valid bearing is a real number.
This sample shows how to call the Geodetic.ParseBearingInDeg method from C# code:
string errorMessage = String.Empty;
string str = "78.5";
int precision = 7;
double bearingInDeg = Double.NaN;
if (Geodetic.ParseBearingInDeg(str, precision, out bearingInDeg, out errorMessage))
{
Console.WriteLine("Bearing, in degrees: " + bearingInDeg.ToString());
}
else
{
Console.WriteLine(errorMessage);
}