Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public class Test
  2. {
  3. private int x,y,z; //number of these properties is large
  4.  
  5. [Pure]
  6. public void Foo()
  7. {
  8. //only x must be allowed to change
  9. }
  10. }
  11.  
  12. Contract.Ensures(Contract.OldValue<int>(y) == y);
  13. Contract.Ensures(Contract.OldValue<int>(z) == z);
  14. ...//and for other large number of properties
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement