public static void Main(string[] args) { Sub sub = new Sub(); Base base = sub; sub.Do(); //prints Sub base.Do(); //prints Base, even though it is the same object. }
public static void Main(string[] args) { Sub sub = new Sub(); Base base = sub; sub.Do(); //prints Sub base.Do(); //prints Base, even though it is the same object. }