Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class IEnumeratorExtension
- {
- public static T NextOrDefault<T>(this IEnumerable<T> enumerable, Func<T, bool> predicate ) where T : class
- {
- return enumerable
- .SkipWhile(current => !predicate(current))
- .Skip(1)
- .FirstOrDefault();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement