Search

Support for Design by ContractTM in the C# Programming Language

By: Rachel Henne-Wu, William Mitchell, Cui Zhang

Abstract

There is evidence that “contracts,” or assertion techniques involving preconditions, postconditions, and invariants, have a positive effect on overall software quality. Regrettably, very few programming languages support these techniques. Since the advent of Bertrand Meyer's Design by ContractTM method, introduced in the language Eiffel, a number of systems have been built to implement support for contracts in more commonly-used languages. Such support has not been satisfactorily implemented in C#. In this paper, we compare the different approaches of existing systems and introduce Contract Sharp, a tool that provides support for contracts in C#.

Cite as:

Rachel Henne-Wu, William Mitchell, Cui Zhang, “Support for Design by ContractTM in the C# Programming Language”, Journal of Object Technology, Volume 4, no. 7 (September 2005), pp. 65-82, doi:10.5381/jot.2005.4.7.a2.

PDF | HTML | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn