Skip to main content
A newer version of this page is available. .

Guard.TypeArgumentIs(Type, Type, String) Method

Ensures that an argument has a specific type.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public static void TypeArgumentIs(
    Type expectedType,
    Type passedType,
    string argumentName
)

Parameters

Name Type Description
expectedType Type

A Type object representing the expected type of the argument.

passedType Type

A Type object representing the actual type of the argument.

argumentName String

A string holding the name of the argument to check.

Remarks

If the specified argument has a different type, an exception is thrown.

See Also