A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://morelinq.github.io/3.0/ref/api/html/M_MoreLinq_MoreEnumerable_CompareCount__2.htm below:

MoreEnumerableCompareCountTFirst, TSecond Method

Compares two sequences and returns an integer that indicates whether the first sequence has fewer, the same or more elements than the second sequence.

Namespace:  MoreLinq
Assembly:

MoreLinq (in MoreLinq.dll) Version: 3.0.0

Syntax
public static int CompareCount<TFirst, TSecond>(
	this IEnumerable<TFirst> first,
	IEnumerable<TSecond> second
)
<ExtensionAttribute>
Public Shared Function CompareCount(Of TFirst, TSecond) ( 
	first As IEnumerable(Of TFirst),
	second As IEnumerable(Of TSecond)
) As Integer
public:
[ExtensionAttribute]
generic<typename TFirst, typename TSecond>
static int CompareCount(
	IEnumerable<TFirst>^ first, 
	IEnumerable<TSecond>^ second
)
[<ExtensionAttribute>]
static member CompareCount : 
        first : IEnumerable<'TFirst> * 
        second : IEnumerable<'TSecond> -> int 
Parameters
first
Type: System.Collections.GenericIEnumerableTFirst
The first sequence
second
Type: System.Collections.GenericIEnumerableTSecond
The second sequence
Type Parameters
TFirst
Element type of the first sequence
TSecond
Element type of the second sequence
Return Value

Type:

Int32
-1

if the first sequence has the fewest elements,

0

if the two sequences have the same number of elements or

1

if the first sequence has the most elements.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type

IEnumerableTFirst

. 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)

.

Exceptions Examples
var first = new[] { 123, 456 };
var second = new[] { 789 };
var result = first.CompareCount(second);

The

result

variable will contain

1

.

See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4