Of Type example in C# LINQ

The default OfType operator filters a collection of multiple object types that implements IEnumerable to return only the type of object specified by OfType ’ s argument. The following example filters an ArrayList of Product and Customer objects to return only Customer objects. ArrayList MixedArray = new ArrayList(); foreach (var p in ProductList) MixedArray.Add(p);   […]
Continue reading…

Enjoyed this post? Share it!