I have the following interface and classes and I get an error saying "Cannot implicitly convert World to IWord...". Thank you for any help:
public interface IWord
{
}
public class Word : IWord
{
}
public class MyTest
{
public IList<IWord> GetAll()
{
// I fixed, there is any better way?
var list data.Where(x => x.Value == n).Select(o => new Word(o.Value, o.Key)).Cast<IWord>().ToList();
return list;
}
}