static void Main() { Derived obj = new Derived(); Console.WriteLine(obj.Add(10, 20)); Console.WriteLine(obj.Add(10, 12.5f)); Console.WriteLine(obj.Add(10, 20, 30)); Console.WriteLine(obj.Add(13.5f, 10)); Console.Read(); }
public static int Main () { Derived d = new Derived (); d.Add (1); if (d.val == 1) return 1; if (d.val == 2) return 0; return 2; }
static int Main() { Derived d = new Derived(); d.Add(1); if (d.val == 1) { return(1); } if (d.val == 2) { return(0); } return(2); }