dotConnect for Oracle Documentation
Devart.Common Namespace / DbLoaderColumnCollection Class / Contains Method / Contains(DbLoaderColumn) Method
The value of the DbLoaderColumn object to find.
Example

In This Topic
    Contains(DbLoaderColumn) Method
    In This Topic
    Gets a value indicating whether a DbLoaderColumn object exists in the collection.
    Syntax
    'Declaration
     
    Public Overloads Function Contains( _
       ByVal value As DbLoaderColumn _
    ) As Boolean
    public bool Contains( 
       DbLoaderColumn value
    )

    Parameters

    value
    The value of the DbLoaderColumn object to find.

    Return Value

    true if the collection contains the DbLoaderColumn; otherwise, false.
    Example
    The following example searches for a DbLoaderColumn within a DbLoaderColumnCollection. If the column exists, the example displays the index of the column. If the column does not exist, the example displays an error. This example assumes that a DbLoaderColumnCollection has already been created.
    public void SearchMyColumns() {
      // ...
      // create OracleLoaderColumnCollection myColumns and OracleLoaderColumn myNewColumn
      // ...
      if (!myColumns.Contains((Object) myNewColumn))
        MessageBox.Show("ERROR: no such column in the collection");
      else
        MessageBox.Show("match on column #" +
          myColumns.IndexOf((Object) myNewColumn).ToString());
    }
    Public Sub SearchMyColumns()
      ' ...
      ' create OracleLoaderColumnCollection myColumns and OracleLoaderColumn myNewColumn
      ' ...
      If Not myColumns.Contains(CType(myNewColumn, Object)) Then
        MessageBox.Show("ERROR: no such column in the collection")
      Else
        MessageBox.Show("match on column #" & myColumns.IndexOf(CType(myNewColumn, Object)).ToString())
      End If
    End Sub 'SearchMyColumns
    See Also