MoreEnumerableSkipLastWhileT Method
Removes elements from the end of a sequence as long as a specified condition is true.
Namespace: MoreLinqAssembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
public static IEnumerable<T> SkipLastWhile<T>(
this IEnumerable<T> source,
Func<T, bool> predicate
)
<ExtensionAttribute>
Public Shared Function SkipLastWhile(Of T) (
source As IEnumerable(Of T),
predicate As Func(Of T, Boolean)
) As IEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ SkipLastWhile(
IEnumerable<T>^ source,
Func<T, bool>^ predicate
)
[<ExtensionAttribute>]
static member SkipLastWhile :
source : IEnumerable<'T> *
predicate : Func<'T, bool> -> IEnumerable<'T>
- source IEnumerableT
- The source sequence.
- predicate FuncT, Boolean
- The predicate to use to remove items from the tail of the sequence.
- T
- Type of the source sequence.
IEnumerableT
An
IEnumerableT containing the source sequence elements except for the bypassed ones at the end.
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).
This operator uses deferred execution and streams its results. At any given time, it
will buffer as many consecutive elements as satisfied by predicate.