S
spider
Hi,
I'm trying to create a DataColumn with the following code:
DataColumn dc = new DataColumn("CustomerID",
System.Type.GetType("System.Data.SqlTypes.SqlString"));
but the GetType method does not return a valid type.
If I use "System.String" it works.
If I create an instance of System.Data.SqlTypes.SqlString and the use the
instance's GetType method inherited from System.Object I can get the type
but I would like to get the type directly from Type.GetType.
Can anyone see what I'm doing wrong?
Is there another way to get what I need with a single method call?
Thanks...Ron
I'm trying to create a DataColumn with the following code:
DataColumn dc = new DataColumn("CustomerID",
System.Type.GetType("System.Data.SqlTypes.SqlString"));
but the GetType method does not return a valid type.
If I use "System.String" it works.
If I create an instance of System.Data.SqlTypes.SqlString and the use the
instance's GetType method inherited from System.Object I can get the type
but I would like to get the type directly from Type.GetType.
Can anyone see what I'm doing wrong?
Is there another way to get what I need with a single method call?
Thanks...Ron