[]
        
(Showing Draft Content)

GrapeCity.Win.Spread.InputMan.CellType.CollectionBase-1.Find

Find Method

Find<TTarget>()

Searches for a T that matches the specified type TTarget, and returns the first occurrence within the entire collection.

Declaration
public TTarget Find<TTarget>() where TTarget : T
Public Function Find(Of TTarget As T)() As TTarget
Returns
Type Description
TTarget

The first T that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type TTarget.

Type Parameters
Name Description
TTarget

Find<TTarget>(Predicate<TTarget>)

Searches for a T that matches the specified type TTarget and matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection.

Declaration
public TTarget Find<TTarget>(Predicate<TTarget> match) where TTarget : T
Public Function Find(Of TTarget As T)(match As Predicate(Of TTarget)) As TTarget
Parameters
Type Name Description
Predicate<TTarget> match

The Predicate<T> delegate that defines the conditions of the T to search for.

Returns
Type Description
TTarget

The first T that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type TTarget.

Type Parameters
Name Description
TTarget
Exceptions
Type Condition
ArgumentNullException

match is null.