I have a proposed dictionary item schema that looks like this:
public interface IDataDictionary
{
List<IDataDictionaryItem> DictionaryItems { get; set; }
}
And the dictionary items as:
public interface IDataDictionaryItem
{
Guid Guild { get; set; }
int SequenceId { get; set; }
string Title { get; set; }
string Value { get; set; }
string Description { get; set; }
string Language { get; set; }
}
When I try to implement this in a concrete class like such:
public class HairColorDictionary : IDataDictionary
{
public List<HairColor> DictionaryItems { get; set; }
}
With the items concrete implementation:
public class HairColor : IDataDictionaryItem
{
public Guid Guild { get; set; }
public int SequenceId { get; set; }
public string Title { get; set; }
public string Value { get; set; }
public string Description { get; set; }
public string Language { get; set; }
}
I get the error message below, and I can't seem to wrap my head around it. Can someone please enlighten me where this went wrong.
Error message:
Error CS0738 'HairColorDictionary' does not implement interface member 'IDataDictionary.DictionaryItems'. 'HairColorDictionary.DictionaryItems' cannot implement 'IDataDictionary.DictionaryItems' because it does not have the matching return type of 'List'.