DataColumnMappingCollection.IndexOfDataSetColumn(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the location of the specified DataColumnMapping with the given DataSet column name.
public:
int IndexOfDataSetColumn(System::String ^ dataSetColumn);
public int IndexOfDataSetColumn (string? dataSetColumn);
public int IndexOfDataSetColumn (string dataSetColumn);
member this.IndexOfDataSetColumn : string -> int
Public Function IndexOfDataSetColumn (dataSetColumn As String) As Integer
- dataSetColumn
- String
The name, which is not case-sensitive, of the data set column to find.
The zero-based location of the specified DataColumnMapping with the given DataSet
column name, or -1 if the DataColumnMapping
object does not exist in the collection.
The following example searches for a DataColumnMapping within the collection. If the object exists, it is returned. The example assumes that a DataColumnMappingCollection collection and a DataColumnMapping object have been created.
public void FindDataColumnMapping()
{
// ...
// create mappings and mapping
// ...
if (mappings.IndexOfDataSetColumn("datadescription") != -1)
mapping = mappings.GetByDataSetColumn("datadescription");
}
Public Sub FindDataColumnMapping()
' ...
' create mappings and mapping
' ...
If mappings.IndexOfDataSetColumn("datadescription") <> - 1 Then
mapping = mappings.GetByDataSetColumn("datadescription")
End If
End Sub
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: