System.Diagnostics.Contracts.Contract.Assume Method

Instructs code analysis tools to assume that the specified condition is true, even if it cannot be statically proven to always be true.

Syntax

[System.Diagnostics.Conditional("DEBUG")]
[System.Diagnostics.Conditional("CONTRACTS_FULL")]
[System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)]
public static void Assume (bool condition)

Parameters

condition
The conditional expression to assume true.

Remarks

At run time, using this method is equivalent to using the Contract.Assert(bool) method.

Requirements

Namespace: System.Diagnostics.Contracts
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0