[]
        
(Showing Draft Content)

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

FindLast Method

FindLast<TTarget>()

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

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

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

Type Parameters
Name Description
TTarget

FindLast<TTarget>(Predicate<TTarget>)

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

Declaration
public TTarget FindLast<TTarget>(Predicate<TTarget> match) where TTarget : T
Public Function FindLast(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 last 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.