Search This Blog

Saturday, October 3, 2009

Determine object type at runtime

from: http://en.csharp-online.net/CSharp_FAQ:_How_check_the_object_type_at_runtime
static bool isInteger (object o)

if (o is int || o is long)
{
return true;
}
else
{
return false;
}

No comments: