Here is the basic Hello World program:
using System;
public class HelloWorld
{
static public void Main()
{
Console.WriteLine("Hello MonoWorld!");
}
}
But the WinForms and GTK# based GUI applications failed to compile, sadly.
WinForms:
using System;
using System.Windows.Forms;
public class HelloWorld : Form
{
static public void Main()
{
Application.Run(new HelloWorld());
}
public HelloWorld()
{
Text = "Hello MonoWorld";
}
}
GTK#:
using Gtk;
using System;
class Hello
{
static void Main()
{
Application.Init();
Window window = new Window("hi");
window.Show();
Application.Run();
}
}
Feedback on my first C# post: Interestingly, I received quite a bit of feedback on my journey with C# all on Buzz. It evolved into quite an interesting thread. [Link]
And finally, here is a bit of programming/compsci humor:
Nope, I do not have mono(nucleosis). :P
No comments:
Post a Comment