1
I am trying to set a Dictionary on my interface, but it is saying that the main class did not implement Dictionary.
Interface.Cs
public interface IItem
{
event Action<string, string, string, string, string, string, string, string, string, string, string> ItemToDataGrid;
void Search();
int SearchType { get; set; }
Dictionary<string, string> SearchKey();
}
Main.Cs
public class Item : IItem
{
public int _SearchType;
public int SearchType
{
get
{
return this._SearchType;
}
set
{
this._SearchType = value;
}
}
Dictionary<string, string> searchKey = new Dictionary<string, string>()
{
{ "Item", "" },
{ "Character", "" },
};
I’m doing something wrong?
Yes, where is the
SearchKey()
, theSearch()
and theItemToDataGrid
? Without implementing them will give error even.– Maniero
I pasted only a small part of the code, the error is in the implementation of Dictionary.
– RedSaba