Dataset Name

  • Thread starter Thread starter Vayse
  • Start date Start date
V

Vayse

From the help
Dim dataSet As DataSet = New DataSet("Suppliers")

Why name the dataset? Why not just use
Dim dataSet As DataSet = New DataSet()

Thanks
Vayse
 
For the same reason you name a DataBase. It lets you identify what you're
working with essentially. this may not be important in some cases but there
certainly are times when it is.

protected void UpdateDataSet(DataSet ds){

switch(ds.DataSetName){
case "Customers":
CustomersdataAdatper.Update(ds);
break;
case "Employees":
EmployeesAdatper.Update(ds);
break;
}

}
 
Vayse,

Why not use
From the help
Dim dataSet As DataSet = New DataSet("Suppliers")

Why name the dataset? Why not just use
Dim dataSet As DataSet = New DataSet()
Dim myDataSet As New DataSet()

This is a (very) small advantage from VBNet above C#

Be aware that using the posibilitie of low and upercases is not language
compliant in Net for public/friend variables which DataSets often are.

http://msdn2.microsoft.com/en-us/library/730f1wy3.aspx

I hope this helps,

Cor
 
Back
Top