DataTable.TableName Property
Gets or sets the name of the DataTable.
Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
| Exception | Condition |
|---|---|
| ArgumentException | null or empty string ("") is passed in and this table belongs to a collection. |
| DuplicateNameException | The table belongs to a collection that already has a table with the same name. (Comparison is case-sensitive). |
The TableName is used to return this table from the parent DataSet object's DataTableCollection (returned by the Tables property).
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.