Click or drag to resize
HelperCheckConditionT Method (Boolean, String, Object)
Confirms that a condition is true. Raise an exception if it is not.

Namespace: Bio.Util
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public static void CheckCondition<T>(
	bool condition,
	string messageToFormat,
	params Object[] formatValues
)
where T : new(), Exception

Parameters

condition
Type: SystemBoolean
The condition to check
messageToFormat
Type: SystemString
A message for the exception
formatValues
Type: SystemObject
Values for the exception's message.

Type Parameters

T
The type of exception that will be raised.
Remarks
Warning: The message with be evaluated even if the condition is true, so don't make it's calculation slow. Avoid this with the "messageFunction" version.
See Also