ofTypeE<TResult> method

Enumerable<TResult> ofTypeE <TResult>()

Returns all elements in the enumerable that are castable to the specified type.

After applying ofTypeE to an enumerable, the resulting enumerable will consist of all elements in the source enumerable that can be safely cast to TResult.

If all elements in the source enumerable can be safely cast to TResult, the resulting enumerable will be unchanged.

Implementation

Enumerable<TResult> ofTypeE<TResult>() {
  return OfTypeEnumerable<T, TResult>(this);
}