I\'m sitting down to write a massive switch() statement to turn SQL datatypes into CLR datatypes in order to generate classes from MSSQL stored procedures. I\'m using this c
You don't need a function.I think you may be looking for
dt.Columns[i].DataType.UnderlyingSystemType
dt - dataTable
This will return the CLR type for corresponding column. Hope this helps and BTW this is my first answer on stack overflow