| Excerpt |
|---|
How many ways can you say Hello World? |
This example shows console, WinForms and Gtk versions of "Hello, world!".
Console
| Code Block |
|---|
print "Hello, world!"
|
| Code Block |
|---|
import System.Windows.Forms
f = Form(Text: "Hello, boo!")
f.Controls.Add(Button(Text: "Click Me!", Dock: DockStyle.Fill))
Application.Run(f)
|
Gtk#
| Code Block |
|---|
import Gtk from "gtk-sharp"
Application.Init()
window = Window("Hello, boo!",
DefaultWidth: 200,
DefaultHeight: 150)
# The application should exit after the window is closed
window.DeleteEvent += def():
Application.Quit ()
window.Add(Button("Click Me!"))
window.ShowAll()
Application.Run()
|