* Mono.Posix.dll.sources: Rename Mono.Posix to Mono.Unix.
[mono.git] / mcs / tools / cilc / Test.cs
1 namespace Demo
2 {
3         using System;
4
5         public class Counter
6         {
7                 int counter;
8
9                 public void Increment ()
10                 {
11                         counter++;
12                         Console.WriteLine ("Instance method invoked: Value incremented, making it " + counter);
13                 }
14
15                 public void AddNumber (int num)
16                 {
17                         counter += num;
18                         Console.WriteLine ("Instance method with an argument invoked: " + num + " added to value, making it " + counter);
19                 }
20         }
21
22         public class Test
23         {
24                 string title;
25                 int counter;
26
27                 public static void StaticMethod ()
28                 {
29                         Console.WriteLine ("Static method invoked");
30                 }
31
32                 public Test ()
33                 {
34                         title = "";
35                         counter = 0;
36
37                         Console.WriteLine ("Class constructor invoked: Value initialised, making it " + counter);
38                 }
39
40                 public void Increment ()
41                 {
42                         counter++;
43                         Console.WriteLine ("Instance method invoked: Value incremented, making it " + counter);
44                 }
45
46                 public void AddNumber (int num)
47                 {
48                         counter += num;
49                         Console.WriteLine ("Instance method with an argument invoked: " + num + " added to value, making it " + counter);
50                 }
51
52                 public string Title
53                 {
54                         get { return title; }
55                         set { title = value; }
56                 }
57
58                 public void Echo (string arg1string)
59                 {
60                         Console.WriteLine ("string: " + arg1string);
61                 }
62
63                 public void Method4 (string arg1string, int arg2int)
64                 {
65                         Console.WriteLine (arg1string + arg2int.ToString ());
66                 }
67
68                 public void GTypeGTypeGType ()
69                 {
70                         Console.WriteLine ("c# method with an unusual name invoked");
71                 }
72         }
73 }