Extend Collection Initializers to Collections via multiple Adds or AddRange #4087
Unanswered
TonyValenti
asked this question in
Language Ideas
Replies: 2 comments 1 reply
-
You can use an extension method for that: public static void Add<T>(this List<T> list, IEnumerable<T> items) => list.AddRange(items); |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think that this should be part of https://github.com/dotnet/runtime, as it does not require a language syntax change.... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be great if I could do:
Beta Was this translation helpful? Give feedback.
All reactions