Sum of form entries

flxbbs's Avatar, Join Date: May 2010
Newbie Member
Hello!
I'm a beginner C# programmer, I just want to know how would I go around writing a script that adds digit entered in a form?
dotNet Zombie's Avatar, Join Date: Aug 2010
Go4Expert Member
something like this

Code:
int x = 0;
foreach (char c in textBox1.Text)
{
      x += Convert.ToInt32(c.ToString());
}
 MessageBox.Show(x.ToString());
shabbir like this
chwax's Avatar, Join Date: May 2010
Newbie Member
first gotta read welcome to c# then start workin