Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ContractClassFor attribute

Tags:

c#

attributes

What is and when would I use

[ContractClassFor(typeof())]

MSDN explanation is not telling me much about it. Thank you,

like image 245
mishap Avatar asked May 16 '12 16:05

mishap


1 Answers

This attribute allows you to define Code Contract conditions for an interface. For more detail, the following site might be useful http://devjourney.com/blog/code-contracts-part-5-abstract-types-and-interfaces/

Update: It seems Kevin has deleted the content. A cache of the content can be found here: http://web.archive.org/web/20120105070912/http://devjourney.com/blog/code-contracts-part-5-abstract-types-and-interfaces/

like image 80
Peter Ritchie Avatar answered Sep 20 '22 20:09

Peter Ritchie