Exercise 3-1 (Hello, world)
Chapter_3 HelloDate | Exercise_3-2 |
Exercise 3-1 TCS, p. 85
Exercise 3-1. Following the HelloDate.cs example in this chapter, create a "Hello, world" program that simply prints out that statement. You need only a single method in your class (the "Main" one that gets executed when the program starts). Remember to make it static. Compile the program with csc (or similar) and run it from the command-line.
Hello.cs
public class Hello
{
public static void Main()
{
System.Console.WriteLine("Hello, world!");
}
}
/*
mcs Hello.cs
mono Hello.exe
Hello, world!
*/
Chapter_3 HelloDate | BACK_TO_TOP | Exercise_3-2 |
Comments
Post a Comment