ApsGis.dll

Geodetic.Longitude.IsValidPrecision Method

Checks if the provided precision is valid.

public static bool IsValidPrecision(
   int precision,
   out string errorMessage
);

Parameters

precision
a precison to validate
errorMessage
an error message, passed by reference (out), that contains detailed error / warning information

Return Value

true - if the precision is valid, false - if the precision is invalid

Remarks

The valid precision is an integer number in the range from 0 (inclusive) to 15 (inclusive).

Example

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

string errorMessage = String.Empty;
int precision = 77;
            
if (Geodetic.Longitude.IsValidPrecision(precision, out errorMessage))
{
    Console.WriteLine("Precision is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

Longitude Class | ApsGis Namespace