Click or drag to resize
ContractRequiresNotNullT Method
Checks if the specified container of variables are not null.

Namespace: Slash.Diagnostics.Contracts
Assembly: Slash.Diagnostics (in Slash.Diagnostics.dll) Version: 1.0.6018.40181
Syntax
public static void RequiresNotNull<T>(
	T container,
	string userMessage
)
where T : class

Parameters

container
Type: T
Variable(s) container.
userMessage
Type: SystemString
The message to display if one of the variables is null.

Type Parameters

T
Type of variables.
Examples
Contract.RequiresNotNull(new { variable }, "Variable is null.");
See Also