In F#, I am parsing a decimal string with
let foo str =
match Decimal.TryParse str with
| (true, result) -> Some result
| (false, _) -> None
which uses the current system culture to parse the string. But I actually want to parse the string using CultureInfo.InvariantCulture. Can this be done in a pattern matching manner like above? If not, what is the cleanest way to do this?
Use something like: