I am using a third party API which has a class. The constructor of this class accepts IList<CustomType>. Here is the constructor per its documentation
public LogicalOrFilter(
IList<ElementFilter> filters
)
I have tried passing in a list<ElementFilter> when I initialize this object. However it does not work, it does not throw any runtime error. Being a third party API, I do not know its internal workings. This class has another constructor that just accepts a single ElementFilter. When I use that, the class does what I want. So I am sure the rest of my code is okay. Can anyone explain which standard data structure could I pass in to this constructor.
List<ElementFilter>implementsIList<ElementFilter>so you are fine calling it with that.If it doesn’t work, talk to the original author of the third party item. It could either be a fault with their code or a fault with your expectation of what the code should be doing.