Belajar C# program-Hello World

Belajar programming ternyata menyenangkan. Saya sedang belajar pemrograman C# menggunakan SharpDevelop. Hello World program di C# adalah program pertama yang saya pelajari di C# dan caranya mirip dengan VB.Net meski ada sedikit penyesuaian.

Dan inilah program pertama saya:

c# hello world

Code:

[codesyntax lang=”csharp”]

/*
 * Created by SharpDevelop.
 * User: dhani
 * Date: 9/18/2015
 * Time: 10:07 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace HelloWorldC
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>
	public partial class MainForm : Form
	{
		public MainForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void Button1Click(object sender, EventArgs e)
		{
			MessageBox.Show ("Hello World","Gamblisfx.com",MessageBoxButtons.OK);
		}
		
		void MainFormLoad(object sender, EventArgs e)
		{
			button1.Text = "Click Me";
			Text = "Tutorial C#-gamblisfx.com";
		}
	}
}

[/codesyntax]

Terima kasih telah mampir.

Admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.