usingSystem;usingNETGeographicLib;namespaceexample_PolygonArea{classProgram{staticvoidMain(string[]args){try{Geodesicgeod=newGeodesic();// WGS84PolygonAreapoly=newPolygonArea(geod,true);poly.AddPoint(52,0);// Londonpoly.AddPoint(41,-74);// New Yorkpoly.AddPoint(-23,-43);// Rio de Janeiropoly.AddPoint(-26,28);// Johannesburgdoubleperimeter,area;uintn=poly.Compute(false,true,outperimeter,outarea);Console.WriteLine(String.Format("{0} {1} {2}",n,perimeter,area));}catch(GeographicErre){Console.WriteLine(String.Format("Caught exception: {0}",e.Message));}}}}