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(
	Type expectedType,
	Type actualType,
	string messageFormat,
	params Object[] messageArgs
)
Visual Basic (Declaration)
Public Shared Sub IsAssignableFrom ( _
	expectedType As Type, _
	actualType As Type, _
	messageFormat As String, _
	ParamArray messageArgs As Object() _
)

Parameters

expectedType
Type: System..::.Type
The Type to compare with the object's Type.
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.

Remarks

This assertion will fail if actualType is null.

Exceptions

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

See Also