Click or drag to resize

TallierExtensionsTallyFirstT, T0, T1 Method (TypeTallyT, T0, T1, FuncT, Boolean, T, Boolean)

Add a first to a tally.

Namespace:  WhetStone.Looping
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static TypeTally<T, T0, T1, T> TallyFirst<T, T0, T1>(
	this TypeTally<T, T0, T1> this,
	Func<T, bool> cond,
	T initial = null,
	bool break = false
)

Parameters

this
Type: WhetStone.LoopingTypeTallyT, T0, T1
The tally to add to.
cond
Type: SystemFuncT, Boolean
The condition for which to count an element.
initial (Optional)
Type: T
The initial result for when an element has not been found.
break (Optional)
Type: SystemBoolean
Whether to break when an element has been found.

Type Parameters

T
The type of the tally.
T0
The first return type of the tally.
T1
The second return type of the tally.

Return Value

Type: TypeTallyT, T0, T1, T
this, to allow piping.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeTallyT, T0, T1. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also