ApsGis.dll

Geodetic.Longitude.IsValidMinutes Method

Checks if the provided minutes part of a longitude in DMS is valid

public static bool IsValidMinutes(
   int minutes,
   out string errorMessage
);

Parameters

minutes
the minutes part
errorMessage
an error message, passed by reference (out), that contains detailed error / warning information

Return Value

true - if the minutes part is valid, false - if the minutes part is invalid

Remarks

The function verifies validity of its arguments and parsing results. The valid minutes part is an integer number in the range from 0 (inclusive) to 60 (exclusive).

Example

This sample shows how to call the Geodetic.Longitude.IsValidMinutes method from C# code:

string errorMessage = String.Empty;

int minutes = 45;
string str = String.Empty;

if (Geodetic.Longitude.IsValidMinutes(minutes, out errorMessage))
{
    Console.WriteLine("The minutes part is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

Longitude Class | ApsGis Namespace