AssignableFromConstraint

Charlie Poole edited this page Jan 31, 2016 · 1 revision
Clone this wiki locally

AssignableFromConstraint tests that one type is assignable from another

Constructor

AssignableFromConstraint( Type )

Syntax

Is.AssignableFrom( Type )
Is.AssignableFrom<T>()

Examples of Use

Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));