I'm trying to parse string to decimal in vb.net which could contain dot or comma, for ex. '5000.00', '5000,00' (actually for Belgium and Niederlands). Code for decimal with dot:
Decimal.TryParse(amountStr, amountVal)
Code for decimal with comma:
Decimal.TryParse(amountStr, NumberStyles.AllowDecimalPoint, CultureInfo.CreateSpecificCulture("nl-BE"), amountVal)
Is it possible to combine these into one code without replacing comma in string?