C# how to add items to a iContainer?
Is there a way to use a method to add items to it? I can not seem to find this in my textbook. Thank you in advance.
- husoskiLv 73 years ago
That's an interface definition. If you're defining it, you get to say what methods the interface supports. One of those methods could be the Add() operation that you want.
It will be up to each class that *implements* that interface to decide how to actually perform that addition.
- AJLv 73 years ago
Use List<type> as your collection object
Event is a class
List<Event> EventSchedule = new List<Event>;
Then you can use LINQ to query against the collection.