I can't find any .add()
method and I don't know what I can do for this.
public class MyDictionary<TKey, Tvalue>
{
private MyDictionary<TKey, Tvalue> md ;
public MyDictionary (int size)
{
md = new MyDictionary<TKey, Tvalue>(size);
}
public void AddItem(TKey key, Tvalue value)
{
md[key] = value;
}
}
There is red line under md.[key]
and it says:
Cannot apply indexing with [] to an expression of type MyDictionary