These are the same:
IEnumerable<string> i;
i = Enumerable.Empty<string>();
i = new string[0];
So, which to use?
I think the first communicates intent more clearly, but it is bigger and a bit noisier, not to mention ugly in the debugger. The second is also more efficient in memory and CPU, if I'm reading Reflector right.
I'm leaning towards the new type[0]
, but wanted to know what you all think.