Application deals with strings that represent decimals that come from different cultures.
For example "1.1 and "1,1" is the same value.
I played with Decimal.TryParse
flags combinations but couldn't achieve the result I want. "1,1" became "11" or "0" after all.
Is it possible to convert such strings to decimal in one line of code without pre-replacing "," char to "." or playing with NumberFormat.NumberDecimalSeparator
?
How do you handle such situations?
Thank you in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…