DataTableMappingCollection.GetByDataSetTable(String) Méthode

Définition

Obtient l’objet DataTableMapping avec le nom de table spécifié DataSet .

public:
 System::Data::Common::DataTableMapping ^ GetByDataSetTable(System::String ^ dataSetTable);
public System.Data.Common.DataTableMapping GetByDataSetTable(string dataSetTable);
member this.GetByDataSetTable : string -> System.Data.Common.DataTableMapping
Public Function GetByDataSetTable (dataSetTable As String) As DataTableMapping

Paramètres

dataSetTable
String

Nom, qui n’est pas sensible à la casse, de la DataSet table à rechercher.

Retours

Objet DataTableMapping portant le nom de table spécifié DataSet .

Exemples

L’exemple suivant recherche un DataTableMapping élément dans la collection. Si l’objet existe, il est retourné. L’exemple suppose qu’une DataTableMappingCollection collection et un DataTableMapping objet ont été créés.

public void FindDataTableMapping()
{
    // ...
    // create mappings and mapping
    // ...
    if (mappings.IndexOfDataSetTable("datacategories") != -1)
        mapping = mappings.GetByDataSetTable("datacategories");
}
Public Sub FindDataTableMapping()
    ' ...
    ' create mappings and mapping
    ' ...
    If mappings.IndexOfDataSetTable("datacategories") <> - 1 Then
        mapping = mappings.GetByDataSetTable("datacategories")
    End If
End Sub

S’applique à