简体   繁体   中英

Get price of the in-app purchase on windows 8.1

How to get price of in-app purchase on windows 8.1?

Because I use this code:

if (!(listing.ProductListings[nid].FormattedPrice == String.Empty))
                    {
                        file.Harga = listing.ProductListings[nid].FormattedPrice;
                    }

The application straight out and display an error message like the following picture: 错误信息

Basically you are calling the apis correctly.

You are getting a "KeyNotFoundException". This means the key you're looking for isn't in the dictionary. https://msdn.microsoft.com/en-us/library/system.collections.generic.keynotfoundexception(v=vs.110).aspx

To find out which products are available, either iterate through your listings with a foreach-loop or use TryGetValue to access a certain value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM