DevLabs > DevLabs Forums > Code Contracts > Missing Contracts in 1.2.20903.10
Ask a questionAsk a question
 

AnswerMissing Contracts in 1.2.20903.10

Answers

  • Monday, October 26, 2009 7:29 PMMike BarnettMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    While this is true, there are a huge number of such "axioms" that capture the relationship between different methods (and note that they can/should span multiple classes/interfaces too). We are searching for a good way to capture such information, but until then would prefer to not include such things in the reference assemblies.

All Replies

  • Monday, October 26, 2009 7:29 PMMike BarnettMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    While this is true, there are a huge number of such "axioms" that capture the relationship between different methods (and note that they can/should span multiple classes/interfaces too). We are searching for a good way to capture such information, but until then would prefer to not include such things in the reference assemblies.
  • Thursday, October 29, 2009 7:33 PMxor88 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Right. Expressing such contracts would be useful for Equals/GetHashCode/CompareTo. Like a pex test that makes an assertion about symmetry for equals.