Click or drag to resize
ContractRequiresTException Method (Boolean, Object)
Specifies a precondition contract for the enclosing method or property, and throws an exception with the provided parameters if the condition for the contract fails.

Namespace: Slash.Diagnostics.Contracts
Assembly: Slash.Diagnostics (in Slash.Diagnostics.dll) Version: 1.0.6018.40181
Syntax
public static void Requires<TException>(
	bool condition,
	params Object[] args
)
where TException : Exception

Parameters

condition
Type: SystemBoolean
The conditional expression to test.
args
Type: SystemObject
Arguments to create exception from.

Type Parameters

TException
The exception to throw if the condition is false.
See Also