Support C# Add() extension methods for collection initializers (like in VB.NET)
Collection Initializer should consider Add() extension methods as well as the built-in ones, which would allow custom code like this:
var l = new List<string> { {10,'a'}, {20,'b'} };
Assuming there exists an extension method
void Add(this List<string>, int, char)
Even Microsoft reported that it would be a good idea, but the issue got closed without a followup: https://connect.microsoft.com/VisualStudio/feedback/details/
18
votes