태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

  


C#을 이용한 간단한 덧셈프로그램



소스 :

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

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

        private void button1_Click(object sender, EventArgs e)
        {
            int a, b, c;

            a = Convert.ToInt32(textBox1.Text);
            b = Convert.ToInt32(textBox2.Text);
            c = a + b;

            textBox3.Text = Convert.ToString(c);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
        }
    }
}

'프로그래밍 > C#' 카테고리의 다른 글

c#과 오라클 연동 (비주얼스튜디오2005 + 오라클)  (3) 2009/02/06
C#으로 만든 윈도우계산기  (5) 2009/01/24
C# - 간단한 덧셈프로그램  (0) 2009/01/11
C# 강제 형변환  (0) 2009/01/10
c# 폼 비활성화  (4) 2008/11/15
YOUR COMMENT IS THE CRITICAL SUCCESS FACTOR FOR THE QUALITY OF BLOG POST