Im attempting to Convert a Price (from an API (code below)).
public class Price
{
public Price();
public Price(double data);
public Price(double data, int decimalPadding);
}
What I would like to do is compare the price from this API to a Double. Simply trying to convert to Double isnt working as I would have hoped.
Double bar = 21.75;
Price price = new Price();
if (Convert.ToDouble(price) >= bar) {
//code
}
when I try something like this, I believe it says the value must be lower than infinity.
How can I convert this price so they can be compared?