M
mercercreek
An attempt to create a stand-alone DataTable returns unexpected errors.
Using this bit of code - lifted from MSDN:
DataTable dt = new DataTable("Customers");
I get the following error: "No overload for method 'DataTable' takes
'1' arguments"
So, I remove the parameter and the compiler makes it as far as:
DataColumn dc = dt.Columns.Add("CustID", typeof(Int32));
At that point I get this error: "DataTable' does not contain a
definition for 'Columns'"
Sure enough, intellisense shows no "Columns" collection for the
DataTable class.
This appears contrary to documentation. Am I missing something?
Thanks
Dan
Using this bit of code - lifted from MSDN:
DataTable dt = new DataTable("Customers");
I get the following error: "No overload for method 'DataTable' takes
'1' arguments"
So, I remove the parameter and the compiler makes it as far as:
DataColumn dc = dt.Columns.Add("CustID", typeof(Int32));
At that point I get this error: "DataTable' does not contain a
definition for 'Columns'"
Sure enough, intellisense shows no "Columns" collection for the
DataTable class.
This appears contrary to documentation. Am I missing something?
Thanks
Dan