AssignableTo

var theSimpsonsDog = new Person { Name = "Santas little helper" };
theSimpsonsDog.ShouldBeAssignableTo<Pet>();

snippet source | anchor

Exception

theSimpsonsDog
    should be assignable to
Simpsons.Pet
    but was
Simpsons.Person

Last updated