Skip to content

ObjectAssertions<TSelf, T>.BeOfType Method ​

Definition ​

Asserts that the value is assignable to the specified type.

c#
public AssertionsChain<ObjectAssertions<TOther>, TOther> BeOfType<TOther>();

View source

Type Parameters ​

NameDescription
TOtherThe expected type.

Returns ​

AssertionsChain<ObjectAssertions<TOther>, TOther>

An AssertionsChain<TAssertions, T> for the value cast to TOther.