JavaScript like Arrays in C#

This is a hack and I know it is but I like how easy it is.

I've been doing a ton of JavaScript lately and this has been bleeding into my C#. I needed to check values in a set during a LINQ query against a small set and came up with

new [] { 1, 2, 3 }.Contains(value)

That did the trick!

Now, would I deploy this in production? Definitely not. I can't put it in a constant so my best bet would be a static array. No sense building up and destroying the array every time the function is called.

Still a neat little trick.