Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AssertUtils.AssertArgumentType Method

Checks whether the specified argument can be cast into the requiredType.

[Visual Basic]
Public Shared Sub AssertArgumentType( _
   ByVal argument As Object, _
   ByVal argumentName As String, _
   ByVal requiredType As Type, _
   ByVal message As String _
)
[C#]
public static void AssertArgumentType(
   object argument,
   string argumentName,
   Type requiredType,
   string message
);

Parameters

argument
The argument to check.
argumentName
The name of the argument to check.
requiredType
The required type for the argument.
message
An arbitrary message that will be passed to any thrown ArgumentException.

See Also

AssertUtils Class | Spring.Util Namespace