Created
August 24, 2020 11:47
-
-
Save TimGeyssens/94e74f161c6e572f92755bbcca699646 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
static public class IEnumerableHelper | |
{ | |
static public Object<T> TakeFirst<T>(this IEnumerable<T> items) | |
{ | |
return items.Take(1).First(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Haha yes, that would be the correct option :) was just trying to help out Chriztianand show him how to do an extension method...