ApsGis.dll

Geodetic.Longitude.IsValidSeconds Method

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

public static bool IsValidSeconds(
   double seconds,
   out string errorMessage
);

Parameters

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

Return Value

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

Remarks

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

Example

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

string errorMessage = String.Empty;

double seconds = 56.789;
string str = String.Empty;

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

See Also

Longitude Class | ApsGis Namespace