Take a string formatted as a six-figure OS grid reference (e.g. "TG514131") and create a new OSRef object that represents that grid reference. The first character must be H, N, S, O or T. The second character can be any uppercase character from A through Z excluding I.

Namespace:  DotNetCoords
Assembly:  DotNetCoords (in DotNetCoords.dll) Version: 1.0.0.9 (1.0.0.9)

Collapse imageSyntax

C#
public OSRef(
	string gridRef
)
Visual Basic (Declaration)
Public Sub New ( _
	gridRef As String _
)
Visual C++
public:
OSRef(
	String^ gridRef
)

Parameters

gridRef
Type: System..::.String
a String representing a six-figure Ordnance Survey grid reference in the form XY123456.

Collapse imageExceptions

ExceptionCondition
System..::.ArgumentExceptionIf the northing or easting are out of range

Collapse imageSee Also