4
Reply

Converting string to float value.

abhishek aerrolu

abhishek aerrolu

Jul 30, 2008
5.4k
0

    float num=Convert.ToSingle("5.3");

    Ganesh Prabhu
    January 18, 2018
    0

    use convertopction convert.TOfloat

    sara vanan
    August 02, 2008
    0

    use the following code : float f1 = float.Parse(textBox1.Text.Trim());

    Farhad
    July 31, 2008
    0

    In the windows form, I have a text box which accept the float value Unable to convert the text box string to float, the code is as below. float f1=(float) textbox1.Text.Trim(); The error I get is "Cannot convert string to float"

    abhishek aerrolu
    July 30, 2008
    0