I simply need to know the "requires" syntax for a C# class interface. If I have a class like this:
public interface IGroupNode : ISceneNode
How can I make the interface require the implementation of IEnumerable? I think this is very simple and just a syntax thing, but feel free to prove me wrong.
Update:
public interface IGroupNode : ISceneNode, IEnumerable<ISceneNode>
Now I'm confused on where to implement IEnumerable? I have no concrete class implementation of ISceneNode. Should I do it in the concrete class implementation of IGroupNode instead?
public interface IGroupNode : ISceneNode, IEnumerable
就像您使用其他界面一样。
public interface IGroupNode : ISceneNode, IEnumerable
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.