Επεξεργασία

Κοινή χρήση μέσω


DataSet.DataSetName Property

Definition

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