I have a method(method A) that returns an Ienumerable object.
The object is a datacontract class that has the following fields:
Id
TotalViews
I have another method(method B) that call calls Method A
Method A has the following:
List<string> response;
response = ExecuteRequest(uri).Select(d => new {d.Id, d.TotalViews }).ToList();
I trying to assign the ienumerable object to a list.
The above does not work as I get errors.
Error
cannot implicitly convert type system.collections.generic.list to system.collections.generic.list
How do I assign all the Ienumerable object to a list?