Has anyone know simple short code to convert this without use additional libraries ?
I came up with the following. It correctly handles negative coordinates (south latitude or west longitude) and returns the remainder (in degrees) that was not evely divided into minutes or seconds.
public static double ConvertDecimalToDegMinSec(double value, out int deg, out int min, out int sec)
{
deg = (int)value;
value = Math.Abs(value - deg);
min = (int)(value * 60);
value = value - (double)min / 60;
sec = (int)(value * 3600);
value = value - (double)sec / 3600;
return value;
}