public IList<IList<string>> GetListOfLists()
{
var result = new List<List<string>>();
return result;
}
Why does the return statement throw this compilation error when List implements IList?
Cannot implicitly convert type
'System.Collections.Generic.List<System.Collections.Generic.List<string>>'
to'System.Collections.Generic.IList<System.Collections.Generic.IList<string>>'
. An explicit conversion exists (are you missing a cast?) c:\ConsoleApplication1\Program.cs 18 20 ConsoleApplication1
What is the best workaround?