var listings = new List<FPListing>();
if (Cache["Listings"] == null)
{
listings = GetFPListings(Industry);
Cache["Listings"] = listings;
}
else
{
listings = (List<FPListing>)Cache["Listings"];
}
The cast throws this exception
Unable to cast object of type 'System.Collections.Generic.List
1[Listings+FPListing]' to type 'System.Collections.Generic.List
1[Listings+FPListing]'.
Which according to GetType are identical types. Is there another step I need to take to get the cast to work?