Contract.Assume Method (Boolean)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Instructs code analysis tools to assume that the specified condition is true, even if it cannot be statically proven to always be true.
Assembly: mscorlib (in mscorlib.dll)
[ConditionalAttribute("CONTRACTS_FULL")] [ConditionalAttribute("DEBUG")] public static void Assume( bool condition )
Parameters
- condition
- Type: System.Boolean
The conditional expression to assume true.
At run time, using this method is equivalent to using the Assert(Boolean) method.
Show: