Verifies that a type may be assigned to a variable of the specified type.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
public static void IsAssignableFrom<TExpected>(
	Type actualType,
	string messageFormat,
	params Object[] messageArgs
)
Visual Basic (Declaration)
Public Shared Sub IsAssignableFrom(Of TExpected) ( _
	actualType As Type, _
	messageFormat As String, _
	ParamArray messageArgs As Object() _
)

Parameters

actualType
Type: System..::.Type
The Type under examination.
messageFormat
Type: System..::.String
The custom assertion message format, or null if none.
messageArgs
Type: array< System..::.Object >[]()[]
The custom assertion message arguments, or null if none.

Type Parameters

TExpected
The Type to compare with the object's Type.

Remarks

This assertion will fail if actualType is null.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThrown if actualType is null.

See Also