Caculate sum by entering values in textboxes

Satyapriyanayak
Posted by Satyapriyanayak under C# category on | Points: 40 | Views : 1135
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 Add
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

private void btnsum_Click(object sender, EventArgs e)
{
int i, j,k;
int.TryParse(textBox1.Text, out i);
int.TryParse(textBox2.Text, out j);
int.TryParse(textBox3.Text, out k);
int result = i + j + k;
label1.Text = result.ToString();
}
}
}

Comments or Responses

Login to post response