Created
September 15, 2011 16:04
-
-
Save alastairs/1219663 to your computer and use it in GitHub Desktop.
Initialise a collection to an extension of another collection
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
private static readonly IEnumerable<Foo> BaseCollectionOfFoo = new List<Foo> | |
{ | |
new Foo(1), | |
new Foo(2), | |
new Foo(3) | |
}; | |
private static readonly IEnumerable<Foo> AllFoo = new List<Foo>(BaseCollectionOfFoo) | |
{ | |
new Foo(4) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment