I have a problem with texbox i want transform the content of textbox to float. I have this code:
textBoxX.Text = String.Format("{0:N2}", decimal.Parse(textBoxX.Text));
textBoxY.Text = String.Format("{0:N2}", decimal.Parse(textBoxY.Text));
textBoxZ.Text = String.Format("{0:N2}", decimal.Parse(textBoxZ.Text));
var X = float.Parse(textBoxX.Text);
var Y = float.Parse(textBoxY.Text);
var Z = float.Parse(textBoxZ.Text); Function(X,Y,Z);
If I put "3.5" in TextBoxX, var X gives me X= 35.0 but if I put "3,5" X give me 3.50. how can I fix this problem, I want that point and comma to transform into 3.50