Visual studio wont convert my string to decimal
Error: Input string was not in a correct format.
Code:
string test = "123.95";
decimal test1 = decimal.parse(test); // string being an int "123" doesnt cause this
also Convert.toDecimal(test); does just the same.
EDIT: Thanks for the answers, I was looking online for how decimals worked and everyone were using '.' and not ','. Sorry about how incredibly stupid I and this post is. And thanks again for the answeres :)
"123,95"?123.95almost universally in programming languages. However, the string representation of that decimal varies widely from one region to another around the earth. .NET is trying to be nice and read in decimal the way you would most naturally write them (accordion to the locale settings on your computer).