I've got an NSDecimalNumber
from StoreKit's SKProduct
class, and I want to convert it to C#'s decimal
type to minimize loss of precision. Is there a straightforward way to do such a thing?
I figure my two choices are:
- Assume that I understand the binary implementation of each and do my own bit-wise conversion, or
- Have
NSDecimalNumber
give me a string and then havedecimal
parse it.
I figure option 1 is way too much work and probably even brittle, so I'm inclined to go with option 2. But that doesn't seem like the best I can do, either. (I can live with how slow it'll be, because it happens exceptionally rarely.