using System; class Foo { private void bar() { Console.WriteLine("Hello from parent"); } } class Baz:Foo { public void bar() { Console.WriteLine("Hello from child"); } } public class Test { public static void Main() { Baz b = new Baz(); b.bar(); } }
Standard input is empty
Hello from child
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!