Utilities.Find<T>(IEnumerable) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Searches for an element that matches the specified type, and returns the first occurrence in the entire IEnumerable.
public:
generic <typename T>
static T Find(System::Collections::IEnumerable ^ items);
public static T Find<T> (this System.Collections.IEnumerable items);
static member Find : System.Collections.IEnumerable -> 'T
<Extension()>
Public Function Find(Of T) (items As IEnumerable) As T
Type Parameters
- T
The type of the item to find.
Parameters
- items
- IEnumerable
The IEnumerable to search.
Returns
T
The first element that matches the specified type, if found; otherwise, the default value for type T
.
Exceptions
The specified value is a null reference.