Question

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 enter image description here


However, when I try to replace var with ProductListing, I get the following error enter image description here So I am unable to access my product information.

This is the product listing class:

public class ProductListing
{
    public string Description { get; set; }
    public string FormattedPrice { get; set; }
    public Uri ImageUri { get; set; }
    public IEnumerable<string> Keywords { get; set; }
    public string Name { get; set; }
    public string ProductId { get; set; }
    public ProductType ProductType { get; set; }
    public string Tag { get; set; }
}
Was it helpful?

Solution

Turns out this is a bug with Resharper 8.2. The new RC update seems to fix it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top