Created
March 4, 2012 19:17
-
-
Save jamesmanning/1974417 to your computer and use it in GitHub Desktop.
Existing ToArray declarion in Enumerable
This file contains hidden or 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
public static TSource[] ToArray<TSource>(this IEnumerable<TSource> source) | |
{ | |
if (source != null) | |
{ | |
Buffer<TSource> buffer = new Buffer<TSource>(source); | |
return buffer.ToArray(); | |
} | |
else | |
{ | |
throw Error.ArgumentNull("source"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment