Which are valid options for System.Data.DataColumn.DataType?

R

roel.schreurs

Hello all,

I am a bit puzzled about the data type of the type of a
System.Data.DataColumn in ADO.NET.

When I try to Add a column to a data table, there are 5 overloads and
one of them has the following hint:
2 of 5 Add(ColumnName As String, type As System.Type, expression As
String) As System.Data.DataColumn
type: The System.Data.DataColumn.DataType of the new column.

Now I am confused and I am afraid I am missing a major OO concept. I
would have hoped for a picklist to choose a System.Type from. Why is
this not available? Also, where do I have to look to find out valid
options? System.Type seems to be an abstract type. Could any type that
inherits from System.Type be passed as the second parameter to Add. If
not so, why does ADO.NET ask for a System.Type?

Explanations would be appreciated.
 
M

Miha Markic [MVP C#]

See help topic
DataColumn.DataType Property
to find out a list of valid types (Int16, Int32, Int64,Boolean, ...).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top