S
Sachin Kulkarni
I am trying to create a DataColumn with Name and DataType parameters.
As I understand from the documentation, one of the overloads supports
creation of a column with these two parameters. When I tried
folllowing, however I get error saying
'int' denotes a 'class' where a 'variable' was expected
code
-------
DataColumn dc = new DataColumn("Name", System.Int32)
or
DataColumn dc = new DataColumn("Name",
System.Type.GetType(System.Int32))
or
MyTable.Columns.Add("Name", System.Int32)
ERROR:
-------
'int' denotes a 'class' where a 'variable' was expected
I am using .NET Framework 1.1 in Visual Studio.NET environment. Is
this a bug or am I doing something wrong
As I understand from the documentation, one of the overloads supports
creation of a column with these two parameters. When I tried
folllowing, however I get error saying
'int' denotes a 'class' where a 'variable' was expected
code
-------
DataColumn dc = new DataColumn("Name", System.Int32)
or
DataColumn dc = new DataColumn("Name",
System.Type.GetType(System.Int32))
or
MyTable.Columns.Add("Name", System.Int32)
ERROR:
-------
'int' denotes a 'class' where a 'variable' was expected
I am using .NET Framework 1.1 in Visual Studio.NET environment. Is
this a bug or am I doing something wrong