C# Windows form application METOD(METHOD) KULLANIMI

C# Windows form application METOD(METHOD) KULLANIMI



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

namespace Metod
{
    public partial class Form1 : Form
    {
       private void topla()
        {
            int s1 = int.Parse(textBox1.Text);
            int s2 = int.Parse(textBox2.Text);
           double sonuc = s1 + s2;
            label1.Text = "sonuç" + sonuc.ToString();
        }
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            topla();
        }
    }
}

Yorumlar