IColumnMappingCollection::IndexOf Method (String^)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the location of the DataColumnMapping object with the specified source column name. The name is case-sensitive.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

int IndexOf(
	String^ sourceColumnName
)

Parameters

sourceColumnName
Type: System::String^

The case-sensitive name of the source column.

Return Value

Type: System::Int32

The zero-based location of the DataColumnMapping object with the specified source column name.

The following example searches for an instance of the derived class, DataColumnMapping, with the given source column name within a DataColumnMappingCollection collection. If the DataColumnMapping exists, the example displays the name and the index of the mapping. If the mapping does not exist, the example displays an error. This example assumes that a DataColumnMappingCollection collection has been created.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: