Reputation: 59
I have a simple problem,
dtERP value = 2885,78,89,78A;
for (int i = 0; i < dtERP.Rows.Count; i++)
{
for (int j = 0; j < dtERP.Columns.Count; j++)
{
object field = dtERP.Rows[j]["QTY"];
if (field != int)
{
}
}
}
How can I validate my field if the value is string?
Upvotes: 2
Views: 2670
Reputation: 39966
You can use the is
operator. Something like this:
if(field is string)
Upvotes: 3