Aşağıdaki program örnek bir Windows Tabanlı C # uygulamasıdır. Yeni bir C# Windows Uygulama projesi (WİNDOWS FORM APPLİCATİON) oluşturun ve bir buton ekleyin butona çift tıklayın aşağıdaki kaynak kodunu kopyalayıp button1 click kısmına yapıştırın.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("BU BENİM İLK PROGRAMIM");
}
}
}Bu C # programını çalıştırdığınızda, mesaj kutusunda “Bu benim ilk programım” mesajını alacaksınız.
