HelperCheckConditionT Method (Boolean, FuncString) |
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<T>(
bool condition,
Func<string> messageFunction
)
where T : new(), Exception
Public Shared Sub CheckCondition(Of T As {New, Exception}) (
condition As Boolean,
messageFunction As Func(Of String)
)
public:
generic<typename T>
where T : gcnew(), Exception
static void CheckCondition(
bool condition,
Func<String^>^ messageFunction
)
static member CheckCondition :
condition : bool *
messageFunction : Func<string> -> unit when 'T : new() and Exception
Parameters
- condition
- Type: SystemBoolean
The condition to check - messageFunction
- Type: SystemFuncString
Function that will generate the message if the condition is false.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:Bio.Util.Helper.CheckCondition``1(System.Boolean,System.Func{System.String})"]
Remarks
messageFunction will only be evaluated of condition is false. Use this version for messages that are costly to compute.
See Also