dotConnect for Salesforce Marketing Cloud Documentation
Devart.Data Namespace / SqlShimParameterCollection<T> Class / Item Property / Item(String) Property
The name of the parameter to retrieve.
Example

In This Topic
    Item(String) Property
    In This Topic
    Gets or sets the Devart.Data.ExactTarget.ExactTargetParameter with the specified name.
    Syntax
    'Declaration
     
    Public Overloads Shadows Property Item( _
       ByVal parameterName As String _
    ) As T
    public new T Item( 
       string parameterName
    ) {get; set;}

    Parameters

    parameterName
    The name of the parameter to retrieve.

    Property Value

    The Devart.Data.ExactTarget.ExactTargetParameter with the specified name.
    Example
    The following example searches for a SqlShimParameter with a given ParameterName within a SqlShimParameterCollection<T>. If the parameter exists, the example displays the name and index of the parameter. If the parameter does not exist, the example displays an error. This example assumes that a SqlShimParameterCollection<T> has already been created.
    public void SearchExactTargetParams() {
      // ...
      // create ExactTargetParameterCollection myParameters
      // ...
      if (!myParameters.Contains("DName"))
        MessageBox.Show("ERROR: no such parameter in the collection");
      else
        MessageBox.Show("Name: " + myParameters["DName"].ToString() +
          "Index: " + myParameters.IndexOf("DName").ToString());
    }
    Public Sub SearchExactTargetParams()
      ' ...
      ' create ExactTargetParameterCollection myParameters
      ' ...
      If Not myParameters.Contains("DName") Then
        MessageBox.Show("ERROR: no such parameter in the collection")
      Else
        MessageBox.Show("Name: "  & myParameters("DName").ToString()  & _
          "Index: "  & myParameters.IndexOf("DName").ToString())
      End If
    End Sub
    See Also