 | CondensedCollectionExtensionsCountTSource Method |
[This is preliminary documentation and is subject to change.]
Returns count of elements in the CondensedCollection that satisfy a condition. Optimized for a CondensedCollection.
Namespace:
Condensed.Linq
Assembly:
Condensed (in Condensed.dll) Version: 0.1.0.0 (0.1.0.0)
Syntaxpublic static int Count<TSource>(
this CondensedCollection<TSource> source,
Func<TSource, bool> predicate
)
<ExtensionAttribute>
Public Shared Function Count(Of TSource) (
source As CondensedCollection(Of TSource),
predicate As Func(Of TSource, Boolean)
) As Integer
public:
[ExtensionAttribute]
generic<typename TSource>
static int Count(
CondensedCollection<TSource>^ source,
Func<TSource, bool>^ predicate
)
[<ExtensionAttribute>]
static member Count :
source : CondensedCollection<'TSource> *
predicate : Func<'TSource, bool> -> int
Parameters
- source
- Type: CondensedCondensedCollectionTSource
CondensedCollection that contains elements to be tested and counted. - predicate
- Type: SystemFuncTSource, Boolean
A function to test each element for a condition.
Type Parameters
- TSource
- The type of the elements in the CondensedCollection.
Return Value
Type:
Int32Count of how many elements in the CondensedCollection satisfy the condition in the predicate function.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
CondensedCollectionTSource. 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