Link to home
Start Free TrialLog in
Avatar of ARACK04
ARACK04

asked on

Casting EntitySet<T>

MVP.Models.IZone IZ = new LinqUtilityWellView.wvt_wvZone();
//Clearly wvt_wvZone implements IZone.  but for some reason the following line does not compile
IEnumerable<MVP.Models.IZone> blah = (IEnumerable<MVP.Models.IZone>)this.wvt_wvZones;

Am I missing something?
Avatar of ARACK04
ARACK04

ASKER

Sorry, I should have mentioned that    this.wvt_wvZones     is of type  EntitySet
ASKER CERTIFIED SOLUTION
Avatar of Priest04
Priest04
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ARACK04

ASKER

EntitySet implements IEnumerable IList and a bunch of other things.  The problem I was having was that IList is not covariant with IList, which is a C# feature.  Thanks for your replies.