Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

System.Diagnostics.Contracts

Provides static classes for representing program contracts such as preconditions, postconditions, and invariants. Commonly Used Types: System.Diagnostics.Contracts.Contract System.Diagnostics.Contracts.ContractClassAttribute System.Diagnostics.Contracts.ContractClassForAttribute System.Diagnostics.Contracts.ContractFailureKind System.Runtime.CompilerServices.ContractHelper System.Diagnostics.Contracts.ContractInvariantMethodAttribute System.Diagnostics.Contracts.PureAttribute System.Diagnostics.Contracts.ContractArgumentValidatorAttribute System.Diagnostics.Contracts.ContractVerificationAttribute System.Diagnostics.Contracts.ContractOptionAttribute When using NuGet 3.x this package requires at least version 3.4.

Author Microsoft
Version 4.3.0
Tags

01/31/2026 07:28:18: Doc summary created

Thanks for showing interest in the docs for System.Diagnostics.Contracts! Looks like you're the first one so we haven't generated the docs yet. Just push the button below to initiate background doc generation. The docs should be ready in a few seconds (up to a few minutes if there are many dependencies), just reload the page to see them!