FromString Method

[VB]

Public Function FromString(ByVal value As String) As Boolean

[C#]

public System.Boolean FromString(System.String value)

 

Description

The FromString method sets the value of this LinearValue to match the value expressed in the string passed as argument.  The Format property must be set with the appropriate string format before this method can be used.  This method returns a boolean value indicating the success of the operation.

Currently, the only format supported is "MGRS", which indicates that the argument to this method is a Military Grid Reference System description of a point.  

 

Example

[VB]

Private Sub GeoCalcNET_LinearValue_FromString(ByVal lv As GeoCalcNET.LinearValue)

lv.Format = "MGRS"

If Not lv.FromString("49HSK871990") Then

MessageBox.Show("FromString failed")

End If

End Sub

 

[C#]

private void GeoCalcNET_LinearValue_FromString(GeoCalcNET.LinearValue lv)

{

lv.Format = "MGRS";

if(! lv.FromString("18SUU8362601432"))

{

MessageBox.Show("unable to set value from string");

}

}