Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static IEnumerable<TSource> SkipWhileImpl<TSource>(
- IEnumerable<TSource> source,
- Func<TSource, bool> predicate)
- {
- using (IEnumerator<TSource> iterator = source.GetEnumerator())
- {
- do
- {
- if (!iterator.MoveNext())
- yield break;
- } while (predicate(iterator.Current));
- do
- {
- yield return iterator.Current;
- } while (iterator.MoveNext());
- }
- }
Add Comment
Please, Sign In to add comment