Code:public class MyDictionary<TKey, TValue> : MyIDictionary<TKey, TValue>
{
private object[] _items;
//private int index = 0;
public MyDictionary()
{
_items = new object[10];
}
public TValue this[TKey key]
{
get
{
return (TValue)_items[key];//cannot implicitly convert type 'TKey' to 'int'
}
set
{
_items[key] = value;
}
}