Export (0) Print
Expand All

List<T>.TakeWhile Method

.NET Framework 3.5

Returns elements from a sequence as long as a specified condition is true, and then skips the remaining elements.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public Extension Method TakeWhile(Func<T, Boolean>) Returns elements from a sequence as long as a specified condition is true. (Defined by Enumerable.)
Public Extension Method TakeWhile(Func<T, Int32, Boolean>) Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function. (Defined by Enumerable.)
Top

Community Additions

ADD
Show:
© 2014 Microsoft