Looking for .net Answers? Try Ask4KnowledgeBase
Looking for .net Keywords? Try Ask4Keywords

.NET Framework OfType


Example

var mixed = new object[] {1,"Foo",2,"Bar",3,"Fizz",4,"Buzz"};
var numbers = mixed.OfType<int>();

Console.WriteLine(string.Join(",", numbers.ToArray()));

//1,2,3,4