-
Notifications
You must be signed in to change notification settings - Fork 26
OfType
Eugene Sadovoi edited this page Jul 7, 2016
·
2 revisions
Filters the elements of an IEnumerable based on a specified type.
OfType(type)
The type to filter the elements of the sequence on.
An Iterable that contains elements from the input sequence of type TResult.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated.
The OfType method returns only those elements in source that can be cast to type TResult.