Searches for an element that matches the conditions defined by the specified predicate,
and returns the first occurrence within the entire
ObjectView.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Function Find( _
ByVal match As Predicate(Of T) _
) As T |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ObjectView(Of T)
Dim match As Predicate(Of T)
Dim value As T
value = instance.Find(match)
|
| C# | |
|---|
public T Find(
Predicate<T> match
) |
| Managed Extensions for C++ | |
|---|
public: T Find(
Predicate<T>* match
) |
| C++/CLI | |
|---|
public:
T Find(
Predicate<T>^ match
) |
Parameters
- match
- The Predicate delegate that defines the conditions of the element to search for.
Return Value
The first element that matches the conditions defined by the specified predicate, if found;
otherwise, the default value for type T.
Exceptions
| Exception | Description |
| ArgumentNullException | Match is null. |
Requirements
Platforms: Windows 2000, Windows XP family, Windows Server 2003 family, Windows Vista family
See Also