public static void Main()
var otherClass = new OtherClass();
Console.WriteLine("OtherClass: " + otherClass.Blub());
SomeClass someClass = otherClass;
Console.WriteLine("Boxed OtherClass: " + someClass.Blub());
var coolClass = new CoolClass();
Console.WriteLine("CoolClass: " + coolClass.Blub());
SomeClass someClass = coolClass;
Console.WriteLine("Boxed CoolClass: " + someClass.Blub());
public virtual string Blub()
public class OtherClass : SomeClass
public class CoolClass : SomeClass
public override string Blub()