[C#] int to string , string to int


// int to string
iNumber = int.Parse(TxtNum1.Text);
dNumber = double.Parse(TxtNum2.Text);
dResult = iNumber + dNumber;
TxtNum2.Text = dResult.ToString();

// string to int

string str;
if (CardGroup.Text == "Major")
{
     for (int i = 1; i <= 22; i++)
    {
          str = i.ToString();
          CardNumber.Items.Add(str);
     }
}

댓글

Designed by JB FACTORY