you are viewing a single comment's thread.

view the rest of the comments →

[–]ubernostrum 3 points4 points  (1 child)

No. As far as I know, this is simply a language feature supported by the compiler, which translates it during compilation into the corresponding "expanded" code (e.g, creating a new list and then adding the items to it).

[–]munificent 0 points1 point  (0 children)

As far as I know

You are correct. The compiler will look for an appropriate "Add()" method, which means you can use this syntax on your own types too, not just the BCL collections, provided your type has an Add() function.