Click or drag to resize

MoreEnumerableStartsWithT Method (IEnumerableT, IEnumerableT)

Determines whether the beginning of the first sequence is equivalent to the second sequence, using the default equality comparer.

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 2.4.0
public static bool StartsWith<T>(
	this IEnumerable<T> first,
	IEnumerable<T> second


Type: System.Collections.GenericIEnumerableT
The sequence to check.
Type: System.Collections.GenericIEnumerableT
The sequence to compare to.

Type Parameters

Type of elements.

Return Value

Type: Boolean
true if first begins with elements equivalent to second.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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