C#
TryParse
Sometimes I just need a reminder
double? fixedPriceDouble = double.TryParse(fixedPrice, out double converted) ? converted : null;
Converts a String
variable of fixedPrice
into a double?
called fixedPriceDouble
.
double? fixedPriceDouble = double.TryParse(fixedPrice, out double converted) ? converted : null;
Converts a String
variable of fixedPrice
into a double?
called fixedPriceDouble
.