using System.Windows.Forms; int sum=0; for (int i=0;i < 10;i++) { sum += i; } MessageBox.Show(sum.ToString()); //45
MessageBox.Show(sum.ToString(),"The sum is:");
MessageBox.Show(sum.ToString(), "The sum is:",MessageBoxButtons.YesNo);
DialogResult dr = MessageBox.Show(sum.ToString(), "The sum is:",MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) {...} else if (dr == DialogResult.No) {...}