G
Guest
Hi,
I'm currently getting up to speed with ADO.NET & have a few questions on it.
This question relates to why a data table is added to a data set such:
DataTable dtEmp = ds.Tables.Add["employees"]; // From book
i would have thought it would be more like:
DataTable dtEmp = New DataTable("employees");
ds.Tables.Add(dtEmp); // The way I think it should be. Works ok
So what is going on in the first line? (from the book)
Is dtEmp being referenced to the "employees" table that is being added to
the dataset? (As opposed to dtEmp actually being added?). It doesn't seem
intuitutive to me...
Thanks for any comments
Ant
I'm currently getting up to speed with ADO.NET & have a few questions on it.
This question relates to why a data table is added to a data set such:
DataTable dtEmp = ds.Tables.Add["employees"]; // From book
i would have thought it would be more like:
DataTable dtEmp = New DataTable("employees");
ds.Tables.Add(dtEmp); // The way I think it should be. Works ok
So what is going on in the first line? (from the book)
Is dtEmp being referenced to the "employees" table that is being added to
the dataset? (As opposed to dtEmp actually being added?). It doesn't seem
intuitutive to me...
Thanks for any comments
Ant