StartsWithExtensionStartsWithT(IEnumerableT, IEnumerableT, IEqualityComparerT) Method
Determines whether the beginning of the first sequence is
equivalent to the second sequence, using the specified element
equality comparer.
Namespace: MoreLinq.ExtensionsAssembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
public static bool StartsWith<T>(
this IEnumerable<T> first,
IEnumerable<T> second,
IEqualityComparer<T>? comparer
)
<ExtensionAttribute>
Public Shared Function StartsWith(Of T) (
first As IEnumerable(Of T),
second As IEnumerable(Of T),
comparer As IEqualityComparer(Of T)
) As Boolean
public:
[ExtensionAttribute]
generic<typename T>
static bool StartsWith(
IEnumerable<T>^ first,
IEnumerable<T>^ second,
IEqualityComparer<T>^ comparer
)
[<ExtensionAttribute>]
static member StartsWith :
first : IEnumerable<'T> *
second : IEnumerable<'T> *
comparer : IEqualityComparer<'T> -> bool
- first IEnumerableT
- The sequence to check.
- second IEnumerableT
- The sequence to compare to.
- comparer IEqualityComparerT
- Equality comparer to use.
- T
- Type of elements.
Booleantrue if
first begins with elements
equivalent to
second.
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).