Code
N0 = 6378137.0 / Math.Sqrt( 1-Math.Pow(0.081819190843,2)*Math.Pow(Math.Sin(RefLat*Math.PI/180),2) );
q1 = Math.Log( Math.Tan( (180.0/4.0+dLat/2.0)*Math.PI/180.0 ) );
q2 = 0.081819190843/2 * Math.Log( (1+0.081819190843*Math.Sin(dLat*Math.PI/180.0) ) /
(1-0.081819190843*Math.Sin(dLat*Math.PI/180.0) ) );
q = q1 - q2 ;
x = N0 * Math.Cos(RefLat*Math.PI/180.0) * ((dLong-CentralMeridian)/57.29577951) ;
y = N0 * Math.Cos(RefLat*Math.PI/180.0) * q ;
N0 = 6378137.0 / Math.Sqrt( 1-Math.Pow(0.081819190843,2)*Math.Pow(Math.Sin(RefLat*Math.PI/180),2) );
q1 = Math.Log( Math.Tan( (180.0/4.0+dLat/2.0)*Math.PI/180.0 ) );
q2 = 0.081819190843/2 * Math.Log( (1+0.081819190843*Math.Sin(dLat*Math.PI/180.0) ) /
(1-0.081819190843*Math.Sin(dLat*Math.PI/180.0) ) );
q = q1 - q2 ;
x = N0 * Math.Cos(RefLat*Math.PI/180.0) * ((dLong-CentralMeridian)/57.29577951) ;
y = N0 * Math.Cos(RefLat*Math.PI/180.0) * q ;