5 public interface INumbered
10 public class Counter
: INumbered
14 public void Increment ()
17 Console
.WriteLine ("Instance method invoked: Value incremented, making it " + counter
);
20 public void AddNumber (int num
)
23 Console
.WriteLine ("Instance method with an argument invoked: " + num
+ " added to value, making it " + counter
);
32 public static void StaticMethod ()
34 Console
.WriteLine ("Static method invoked");
42 Console
.WriteLine ("Class constructor invoked: Value initialised, making it " + counter
);
45 public void Increment ()
48 Console
.WriteLine ("Instance method invoked: Value incremented, making it " + counter
);
51 public void AddNumber (int num
)
54 Console
.WriteLine ("Instance method with an argument invoked: " + num
+ " added to value, making it " + counter
);
57 public double GetDoubleValue ()
59 return (double)counter
/2;
62 public int GetValue ()
67 public static Drink
PickDrink ()
75 set { title = value; }
78 public void Echo (string arg1string
)
80 Console
.WriteLine ("string: " + arg1string
);
83 public string MakeUpper (string arg1string
)
85 return arg1string
.ToUpper ();
88 public void Method4 (string arg1string
, int arg2int
)
90 Console
.WriteLine (arg1string
+ arg2int
.ToString ());
93 public void GTypeGTypeGType ()
95 Console
.WriteLine ("c# method with an unusual name invoked");