object val
1. if (val.GetType ()==typeof (int))
{
........
}
2. if (val is int)
{
............
}
3.as
string s = val as string;
if (s != null)
{
Console.WriteLine(s);
}
else
{
Console.WriteLine("not a string");
}