HelperCheckCondition Method (Boolean, String, Object) |
Confirms that a condition is true. Raise an exception if it is not.
Namespace: Bio.UtilAssembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax public static void CheckCondition(
bool condition,
string messageToFormat,
params Object[] formatValues
)
Public Shared Sub CheckCondition (
condition As Boolean,
messageToFormat As String,
ParamArray formatValues As Object()
)
public:
static void CheckCondition(
bool condition,
String^ messageToFormat,
... array<Object^>^ formatValues
)
static member CheckCondition :
condition : bool *
messageToFormat : string *
formatValues : Object[] -> unit
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.
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