I am new to generics. I want to implement my own collection by deriving it from IList
interface.
Can you please provide me some link to a class
Visual Studio offers an automatic full working implementation of interfaces like IList<>.
You need only to write something like this code:
public class MyCollection : IList
{
// This line is important. Without it the auto implementation creates only
// methods with "NotImplemented" exceptions
readonly IList _list = new List();
}
(while the line
readonly IList _list = new List();
is the important one!)
Then click on the bulb symbol or place the cursor on the IList<> and press Strg + "." You will become several implementations offered, like: