I'm wondering if there's simple way to check if a string is in a value format of any kind. Meaning the number one-thousand could be represented in any of the following ways:
- 1000
- 1000.00
- 1,000
- 1,000.00
- $1,000.00
I've tried double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out n)
but that isn't working for items with the currency symbol out in front. So I tried double.TryParse(value NumberStyles.Any | NumberStyles.AllowCurrencySymbol, CultureInfo.InvariantCulture, out n)
but that is also not working.
Basically I'd like to check if a value can be considered a number value at all.