Skip to content

Commit

Permalink
Updated mono-basics.md and clarified some of the instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
akoeplinger committed Sep 14, 2014
1 parent 2ce7abe commit 23f7980
Showing 1 changed file with 37 additions and 38 deletions.
75 changes: 37 additions & 38 deletions docs/getting-started/mono-basics.md
Expand Up @@ -23,49 +23,18 @@ public class HelloWorld
}
```

To compile, use gmcs:
To compile, use mcs:

mcs hello.cs

Either compiler will create "hello.exe", which you can run using:
The compiler will create "hello.exe", which you can run using:

mono hello.exe

The program should run and output:

Hello Mono World

Gtk# Hello World
-----------------

The following program tests writing a Gtk# application.

``` csharp
using Gtk;
using System;

class Hello
{
static void Main ()
{
Application.Init ();

Window window = new Window ("Hello Mono World");
window.Show ();

Application.Run ();
}
}
```

To compile, use gmcs with the -pkg option to tell the compiler to pull in the Gtk# libraries:

mcs hello.cs -pkg:gtk-sharp-2.0

The compiler will create "hello.exe", which you can run using:

mono hello.exe

Winforms Hello World
--------------------

Expand All @@ -89,11 +58,11 @@ public class HelloWorld : Form
}
```

To compile, use gmcs with the -pkg option to tell the compiler to pull in the Winforms libraries:
To compile, use mcs with the -pkg option to tell the compiler to pull in the Winforms libraries:

mcs hello.cs -pkg:dotnet

Either compiler will create "hello.exe", which you can run using:
The compiler will create "hello.exe", which you can run using:

mono hello.exe

Expand All @@ -114,11 +83,41 @@ Create a text file with the name hello.aspx and the content:
</asp:calendar>
```

Then run the xsp2 command from that directory:
Then run the xsp4 command from that directory:

``` bash
xsp2
xsp4
```

Use a web browser to contact [http://localhost:9000/hello.aspx](http://localhost:9000/hello.aspx)
Gtk# Hello World
-----------------

The following program tests writing a Gtk# application.

``` csharp
using Gtk;
using System;

class Hello
{
static void Main ()
{
Application.Init ();

Window window = new Window ("Hello Mono World");
window.Show ();

Application.Run ();
}
}
```

Use a web browser to contact [http://localhost:8080/hello.aspx](http://localhost:8080/hello.aspx)
To compile, use mcs with the -pkg option to tell the compiler to pull in the Gtk# libraries (note that Gtk# must be installed on your system for this to work):

mcs hello.cs -pkg:gtk-sharp-2.0

The compiler will create "hello.exe", which you can run using:

mono hello.exe

0 comments on commit 23f7980

Please sign in to comment.