private void button1_Click(object sender, EventArgs e)
{
string c = "123";
int[] array = new int[100];
int sum=0;
for (int i = 0; i <= c.Length-1; i++)
{
array[i] = int.Parse(c.Substring(i, 1));
MessageBox.Show("各个数字分别为:"+array[i].ToString());
sum = sum + array[i];
}
MessageBox.Show("所有数字和为:"+sum.ToString());
}