I’ve always believed (but admittedly never bothered to check) that if you write in C something like static const int lookup[] = { … long list of numbers … } then the compiler does all the heavy lifting; the array is generated in its final form as part of the executable image and there’s no runtime cost to creating and initialising the array. I suppose my first question is “is this actually the case with modern C compilers?” and my second question is “what is the C# equivalent?”

Note that a C# list is much closer to a C++ std::vector, and in C++ the code:
std::vector myVect = { 3, 4, 5, 6} is going to create a std::inititlizer_list and run a constructor on std::vector. I am not really sure at all the details that are involved there. It is at least possible that in the case of integer literals, that the equivilent code that runs in C++ the static array as in C with a memcpy to copy the data into the std::vector.

In C#, I am less certain what the code
int[] x = new int[] { 1, 2, 3, 4}

actually does. At a minimum the array would be on the heap and need to be copied out there. (since there is no such thing as a const array in C#, a copy has to be made)

I like these a lot…it’s nice to learn new stuff about .Net, even after working with it for so long. I’d been using .Concat(…) to achieve the same results, but I like the semantics of the initializer quite a bit more, since it’s not building an expression and hooking into the LINQ infrastructure (it’s a bit of a heavy hand for this task)