AddAngularItem Method

[VB]

Public Function AddAngularItem(ByVal name As String) As Boolean

[C#]

public System.Boolean AddAngularItem(System.String name)

 

Description

The AddAngularItem method adds a new parameter to the ParameterCollection that holds an AngularValue as it's value.  Once the parameter has been added, it's value can be set with the AngularValue property.  If the parameter name specified as the argument to this method already exists in the collection, a GeoCalcException will be thrown.  This method returns a boolean value indicating the success of the operation.

 

Example

[VB]

Private Sub GeoCalcNET_ParameterCollection_AddAngularItem(ByVal pc As GeoCalcNET.ParameterCollection)

If pc.AddAngularItem("latitude") Then

Dim av As New GeoCalcNET.AngularValue

av.InDegrees = -24.8

pc.AngularItem("latitude") = av

End If

End Sub

 

[C#]

private void GeoCalcNET_ParameterCollection_AddAngularItem(GeoCalcNET.ParameterCollection pc)

{

GeoCalcNET.AngularValue av = new GeoCalcNET.AngularValue();

av.InDegrees = 33.333;

String paramName = "origin latitude";

if(pc.AddAngularItem(paramName))

{

pc.set_AngularItem(paramName, av);

}

}