Contract.Assume Method

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAssume(Boolean)

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

System_CAPS_pubmethodSystem_CAPS_staticAssume(Boolean, String)

Instructs code analysis tools to assume that a condition is true, even if it cannot be statically proven to always be true, and displays a message if the assumption fails.

Return to top
Show: