static int Main() { // // These tests just are compilation tests, the new property code // will excercise these // der d = new der(); if (d.Message != "der") { return(1); } basec b = new basec(); if (b.Message != "base") { return(2); } Derived dd = new Derived(); dd.Thingy = 10; if (dd.BaseThingy != 0) { return(3); } Console.WriteLine("Test ok"); return(0); }
public static void Main(string[] args) { der obj = new der(10, 20); System.Console.WriteLine(obj.x); System.Console.WriteLine(obj.a); System.Console.WriteLine(obj.b); }
static int Main () { // // These tests just are compilation tests, the new property code // will excercise these // der d = new der (); if (d.Message != "der") return 1; basec b = new basec (); if (b.Message != "base") return 2; Derived dd = new Derived (); dd.Thingy = 10; if (dd.BaseThingy != 0) return 3; Console.WriteLine ("Test ok"); return 0; }
public static void main(String[] args){ der obj = new der(10,20); Console.WriteLine(obj.x); Console.WriteLine(obj.a); Console.WriteLine(obj.b); }