public static void Main()
ParentClass parentClassInstance = new ParentClass();
ChildClass childClassInstance = new ChildClass();
parentClassInstance.DoStuff();
childClassInstance.DoStuff();
childClassInstance.DoOtherStuff();
protected object protectedObject = "RootItem";
protected void ProtectedVoidMethod()
Console.WriteLine("ParentClass protected object: " + protectedObject.ToString());
Console.WriteLine("ParentClass DoStuff()");
ParentClass parentClassInstance = new ParentClass();
parentClassInstance.ProtectedVoidMethod();
class ChildClass : ParentClass
public void DoOtherStuff()
Console.WriteLine("Child DoOtherStuff()");
ChildClass childClassInstance = new ChildClass();
childClassInstance.ProtectedVoidMethod();
Console.WriteLine("Parent InternalClass protected object: " + this.protectedObject);