GuardArgumentIsOfTypeT Method (Boolean, Object, String, String) |
Throws an exception if argumentValue is not of type T or a subtype of T.
Namespace:
Enkoni.Framework
Assembly:
Enkoni.Framework (in Enkoni.Framework.dll) Version: 1.3.0.1
Syntaxpublic static void ArgumentIsOfType<T>(
bool allowDerivedTypes,
Object argumentValue,
string argumentName,
string message
)
Public Shared Sub ArgumentIsOfType(Of T) (
allowDerivedTypes As Boolean,
argumentValue As Object,
argumentName As String,
message As String
)
public:
generic<typename T>
static void ArgumentIsOfType(
bool allowDerivedTypes,
Object^ argumentValue,
String^ argumentName,
String^ message
)
static member ArgumentIsOfType :
allowDerivedTypes : bool *
argumentValue : Object *
argumentName : string *
message : string -> unit
Parameters
- allowDerivedTypes
- Type: SystemBoolean
Indicates if derived types are also allowed. - argumentValue
- Type: SystemObject
The argument value to test. - argumentName
- Type: SystemString
Name of the argument. - message
- Type: SystemString
The message that will be passed to the exception.
Type Parameters
- T
- The type that is expected.
Exceptions
Remarks
See Also