I have an interface which is being used like this:
var descr = new IMyInterface[3];
At first glance I thought that this doesn’t make any sense since it looks like an Interface is being instantiated (which isn’t possible). So I think that this is probably a call to an Indexer defined in the interface but I still don’t quite understand how this works. So my question is:
- What is this call doing? Is it calling an indexer defined in the interface?
- What implementation of the interface’s indexer is being used?
Thanks for the help 🙂
You are creating an array of 3
IMyInterface… but each item is null in the array.