List<object> objCollection=new List<object>() {10 , 20, null, "hello", 12.5};
foreach( object o in new List<object>() {10 , 20, null, "hello", 12.5})
{
if( o is *)
{
Console.WriteLine("Its a match",o);
}
}
Here * is the wild card that matches all types in C#.