[C#] int to string , string to int
- Language/C#
- 2009. 2. 4.
// 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);
}
}
'Language > C#' 카테고리의 다른 글
[c#] convert a string to a byte array and vica-versa in VB.NET and C# (0) | 2009.01.31 |
---|---|
[C# 고급] GDI+ 개요 및 특징 (0) | 2008.11.13 |