#Ideally I want to do something like this
1 messages · Page 1 of 1 (latest)
Still not clear as to what you're trying to achieve. You can have a list<T> in a class just fine.
I want to have an interface with lists and then have certain classes to inherit from it to force them to have these lists
I have three lists with different targeting types, and I have IsTargetable function, which checks whether the target meets the lists requirement. Instead of passing three lists to the IsTargetable, I want to pass an interface IAction
You mean you want classes to implement the interface. Okay, that makes sense. Can't you use an enumerator to go over the List<ITargetable>()?