DatumShiftInfo Constructor

[VB]

Public Sub New()

Public Sub New(ByVal name As String, ByVal code As String, ByVal reverseUsage As Boolean)

[C#]

public DatumShiftInfo()

public DatumShiftInfo(System.String name, System.String code, System.Boolean reverseUsage)

 

Description

The DatumShiftInfo constructor creates a new instance of the DatumShiftInfo class.  There are two signatures for this constructor, one of which takes no arguments, and one of which takes three arguments.  The constructor that takes no arguments produces a DatumShiftInfo with the Code property set to the empty string, the Name property set to the empty string, and the ReverseUsage property set to false.  The constructor that takes three arguments let's you specify the value of the Name, Code, and ReverseUsage properties.

 

Example

[VB]

Private Sub GeoCalcNET_DatumShiftInfo(ByVal ds As GeoCalcNET.DatumShift)

Dim name As String = ds.Name

Dim code As String

If ds.Identifiers.Exists("GC") Then

code = ds.Identifiers.Item("GC")

End If

Dim rev As Boolean = ds.ReverseUsage

 

Dim dsi1 As New GeoCalcNET.DatumShiftInfo

dsi1.Name = name

dsi1.Code = code

dsi1.ReverseUsage = rev

 

Dim dsi2 As New GeoCalcNET.DatumShiftInfo(name, code, rev)

End Sub

 

[C#]

private void GeoCalcNET_DatumShiftInfo(GeoCalcNET.DatumShift ds)

{

String name = ds.Name;

String code = "";

if(ds.Identifiers.Exists("GC"))

{

code = ds.Identifiers.get_Item("GC");

}

bool rev = ds.ReverseUsage;

 

GeoCalcNET.DatumShiftInfo dsi1 = new GeoCalcNET.DatumShiftInfo();

dsi1.Code = code;

dsi1.Name = name;

dsi1.ReverseUsage = rev;

 

GeoCalcNET.DatumShiftInfo dsi2 = new GeoCalcNET.DatumShiftInfo(name, code, rev);

}