happysmile
happysmile

Reputation: 7777

how to find whether datacolumn row value contains string or integer

i have an datatable with column unit. here column name is unit

unit

abc

123

ass

ttt

here i need to check whether the row value conatins string or integer

thanks prince

Upvotes: 0

Views: 1390

Answers (2)

Jocke
Jocke

Reputation: 2284

here are some examples on how you can check this. But you question is not to clear, when and how do you need to check the values?

http://social.msdn.microsoft.com/forums/en-US/winforms/thread/84990ad2-5046-472b-b103-f862bfcd5dbc/ http://www.thescarms.com/dotnet/IsNumeric.aspx

Upvotes: 1

Adam Houldsworth
Adam Houldsworth

Reputation: 64487

DataColumn has a DataType property - this will tell you what the column is using.

Upvotes: 3

Related Questions