ApsNadcon .NET Library

ApsNadcon.IsValidLatitude Method

Checks if the provided latitude (in decimal degrees) is valid.

public static bool IsValidLatitude(
   double latInDeg,
   out string errorMessage
);

Parameters

latInDeg
a latitude (in decimal degrees) to validate
errorMessage
an error message, passed by reference (out), that contains detailed error / warning information

Return Value

true - if the latitude is valid, false - if it is invalid

Remarks

The valid latitude is a real number in the range from -90.0 (inclusive) to 90.0 (inclusive).

Example

This sample shows how to call the ApsNadcon.IsValidLatitude method from C# code:

double latInDeg = 45.13;

string errorMessage = String.Empty;
            
if (ApsNadcon.IsValidLatitude(latInDeg, out errorMessage))
{
    Console.WriteLine("Latitude is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

ApsNadcon Class | ApsNadcon Namespace