...

View Full Version : [C#] Converting from int to string



Scientist_nl
10-26-2007, 03:40 PM
Hi guys,

How can I convert an int to a string in C#? This is my code now:



public Form3()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
int i = 9;
MessageBox.Show(i);
}


I know there is a much easyer way to get a 9 into a messagebox, but as you may understand, the actual problem is a lot bigger, I want to try to solve that myself before calling in any help ;)

Anyone? Thanks in advance!

Antoniohawk
10-26-2007, 04:17 PM
There are quite a few methods. A simple Google query will yield an applicable solution.

BarrMan
10-26-2007, 08:12 PM
int intNumber = 12947;
string strNumber = Convert.toString(intNumber);

Scientist_nl
10-26-2007, 11:20 PM
Got it working already, this one is solved!

99999 issues to go :p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum