DataTableMappingCollection.GetByDataSetTable(String) Méthode

Définition

Obtient l'objet DataTableMapping portant le nom de table DataSet spécifié.

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 ne respecte pas la casse de la table DataSet à rechercher.

Retours

DataTableMapping

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

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 à