Skip to main content
System.Diagnostics.Contracts package icon

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 - 1548494

Total Downloads
461.8M
461,830,415
Published
Nov 18, 2015
Latest stable version

Install

.NET CLI
dotnet add package System.Diagnostics.Contracts --version 4.0.1-beta-23516
Package Manager Console
Install-Package System.Diagnostics.Contracts -Version 4.0.1-beta-23516
PackageReference
<PackageReference Include="System.Diagnostics.Contracts" Version="4.0.1-beta-23516" />

Frameworks

.NETFramework4.5 Windows8.0 WindowsPhone8.0 WindowsPhoneApp8.1 .NETPlatform5.1 .NETCore5.0

Dependencies

System.Runtime
.NETPlatform5.1
[4.0.0, )
System.Runtime
.NETCore5.0
[4.0.0, )

Adoption guide

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.

Compatibility metadata lists 6 target frameworks; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.