convert text to number C#

60

convert string to number C# -

int x = 0;

Int32.TryParse(TextBoxD1.Text, out x);

convert text to number C# -

      //lblTemp.Text = "" + Temperature;  this statement is not required.
      if (Convert.ToInt32(Temperature) <= 32)
        {
            lblResult.Text = "It is freezing outside!";
        }

Comments

Submit
0 Comments