May 2010
Intermediate to advanced
1272 pages
61h 18m
English
When you use code contracts, the first requirement is the System.Diagnostics.Contracts namespace, exposed by the Mscorlib.dll assembly. By the way, this is not enough to make your code take advantage of contracts. Although you never see this, Visual Studio invokes behind the scenes some command-line tools. This subsection provides basic information on these tools and on their purpose.
As you know, when you compile a .NET executable, the file is made of metadata and Intermediate Language. When you use contracts, especially for runtime checking, the Intermediate Language within an executable needs to be modified to recognize contracts. The edits are performed by the CCrewrite.exe tool that injects the ...
Read now
Unlock full access