DataSet.DataSetName Property
Definition
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 or sets the name of the current DataSet.
public:
property System::String ^ DataSetName { System::String ^ get(); void set(System::String ^ value); };
public string DataSetName { get; set; }
[System.Data.DataSysDescription("DataSetDataSetNameDescr")]
public string DataSetName { get; set; }
member this.DataSetName : string with get, set
[<System.Data.DataSysDescription("DataSetDataSetNameDescr")>]
member this.DataSetName : string with get, set
Public Property DataSetName As String
Property Value
The name of the DataSet.
- Attributes
Examples
The following example creates a new DataSet with the given DataSetName.
private void CreateDataSet()
{
DataSet dataSet = new DataSet("SuppliersProducts");
Console.WriteLine(dataSet.DataSetName);
// Add a DataTable.
dataSet.Tables.Add(new DataTable("Suppliers"));
// Add a DataColumn to the DataTable.
dataSet.Tables["Suppliers"].Columns.Add
(new DataColumn("CompanyName",
System.Type.GetType("System.String")));
}
Private Sub CreateDataSet()
Dim dataSet As DataSet
dataSet = New DataSet("SuppliersProducts")
Console.WriteLine(dataSet.DataSetName)
End Sub
Applies to
See also
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.