I am developing a Windows Phone 8 app with in-app purchase capability. In order to retrieve my products I do this:
ListingInformation listing = await CurrentApp.LoadListingInformationAsync();
foreach (var productListing in listing.ProductListings.Values)
{
...
}
where listing.ProductListings’s type is as shown below
However, when I try to replace var with ProductListing, I get the following error
if I leave it as ‘var’, the compiler doesn’t interpret it as ‘ProductListing’, rather the var ends up being of type ‘TValue’ which I don’t know what that is, and it has only 4 fields available for access (Equals,GetHashCode,GetType,ToString).
So I am unable to access my product information. Any ideas how to fix this?