Whetstone Class reference
Whetstone Class reference
Whetstone
WhetStone Namespaces
WhetStone.Looping
compareCount Class
compareCount Methods
CompareCount(T0, T1) Method
compareCount
CompareCount
T0
,
T1
Method
Compares the lengths of two
IEnumerable
T
s, avoiding enumerating more than needed.
Namespace:
WhetStone.Looping
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
Copy
public
static
int
CompareCount
<T0, T1>(
this
IEnumerable
<T0>
this
,
IEnumerable
<T1>
other
)
Parameters
this
Type:
System.Collections.Generic
IEnumerable
T0
The first
IEnumerable
T
to compare.
other
Type:
System.Collections.Generic
IEnumerable
T1
The second
IEnumerable
T
to compare.
Type Parameters
T0
The type of the first
IEnumerable
T
.
T1
The type of the second
IEnumerable
T
.
Return Value
Type:
Int32
-1 if
this
is shorter, 1 if
other
is shorter, 0 if they have the same length.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerable
T0
. 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)
.
Remarks
If either
IEnumerable
T
s are
AsCollection
T
(IEnumerable
T
, Boolean, Boolean)
compatible, they will not be enumerated at all.
See Also
Reference
compareCount Class
WhetStone.Looping Namespace