Convert decimal to Latitude/Longitude?
<p>I am trying a GPS application and I want to convert decimal figure to Latitude/Longitude but i am not reaching on exact solution.I have tried below</p>

<pre><code>string decimalToLatLong(decimal lat,decimal refPoint)
{
 bool isNeg = lat &lt; 0;
        int d = (int)lat;
        int m = (int)((lat - d) * 60);
        decimal s = ((((lat - d) * 60) - m) * 60);
return (d+m+s).ToString("00.000");
 if (isLat)
            direction = isNeg ? "S" : "N";
        else
            direction = isNeg ? "W" : "E";
}
</code></pre>
