can someone tell me how to convert a string to a float.
(Float)"1";
does not work.
float result; if (Float.TryParse(myString, out result)) { // parse was successful and result contains the parsed value } else { // parse failed }
thank you but i already came up with an answer.
float fCost = Convert.ToInt64(TextBox9.Text);