DataTableCollection.Item Property (String)

 

Gets the DataTable object with the specified name.

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

member Item : 
        name:string -> DataTable with get

Parameters

name
Type: System.String

The name of the DataTable to find.

Property Value

Type: System.Data.DataTable

A DataTable with the specified name; otherwise null if the DataTable does not exist.

If a DataTable name exists that matches the case of the search string, it is returned. Otherwise a case-insensitive search is performed, and if a DataTable name is found that matches this search, it is returned.

Use the Contains method to determine whether a table with a specific name or index exists.

The following example retrieves a single table by name from the DataTableCollection.

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

.NET Framework
Available since 1.1
Return to top
Show: