I've come across the following C# syntax for the first time, I would have discarded it as a syntax error except that VS is absolutely happy with it and compiles.
var a = new ISomeInterface[0];
The interface is declared as
public interface ISomeInterface
{
}
Links to further reading are also highly appreciated.
You've created an array of ISomeInterface
.
This is the same as declaring any other array, such as:
string[] a = new string[0];
I kinda did a double-take on that at first too, because at first glance it appeared the code was instantiating an interface, something you can't normally do.