1 using namespace System;
 
   11             lat = DMS::Decode(52,39,27.2531),
 
   12             lon = DMS::Decode( 1,43, 4.5177);
 
   16             OSGB::GridReference(
x, 
y, 2, gridref);
 
   17             Console::WriteLine(String::Format(
"{0} {1} {2}", 
x, 
y, gridref));
 
   21             String^ gridref = 
"TG5113";
 
   24             OSGB::GridReference(gridref, 
x, 
y, prec, 
true);
 
   27             Console::WriteLine(String::Format(
"{0} {1} {2}", prec, 
lat, 
lon));
 
   31         Console::WriteLine(String::Format(
"Caught exception: {0}", 
e->Message));