Monday, January 18, 2010

Adding two #'s using the Software Development Life Cycle

Here is a program that I created using the very steps that I listed in the blog about the software development life cycle.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Adding_numbers_tutorial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
int Number1;
int Number2;
int Total;
Number1 = Convert.ToInt32(txtnum1.Text);
Number2 = Convert.ToInt32(txtnum2.Text);

Total = (Number1 + Number2);

txtTotal.Text = Convert.ToString(Total);
}

private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}

}
}

No comments:

Post a Comment