Difference between revisions of "Helloworld in csharp"
esse quam videri
Line 19: | Line 19: | ||
* csc run the HelloWorld.exe created by csc | * csc run the HelloWorld.exe created by csc | ||
** If you are using SCiTE and csc is setup correctlt in you enviromet variables you can just press | ** If you are using SCiTE and csc is setup correctlt in you enviromet variables you can just press | ||
− | *** F7 to compile [[HelloWorldSciteCompile.png]] | + | *** F7 to compile [[Image:HelloWorldSciteCompile.png]] |
− | *** F5 to run | + | *** F5 to run [[Image:HelloWorldSciteRun.png]] |
* use mono to run the HelloWorld.exe created by msc | * use mono to run the HelloWorld.exe created by msc | ||
mono HelloWorld.exe | mono HelloWorld.exe |
Revision as of 02:38, 11 January 2006
Hello world in C#
- open a text editor (I like to use SCiTE)
- type in
- <csharp>using System;
namespace HelloClass {
class HelloWorld { public static void Main() { Console.WriteLine("Hello World!"); } }
}</csharp>
3 Save the file as HelloWorld.cs
4 Coplile the .cs file using csc or msc
5 Use csc (windows) or mcs (*nix) ro compile
- csc run the HelloWorld.exe created by csc
- use mono to run the HelloWorld.exe created by msc
mono HelloWorld.exe