Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public class ValueWrapper
  2. {
  3.  
  4. private double currentValue, previousValue
  5.  
  6. public double GetValue()
  7. {
  8. return currentValue;
  9. }
  10.  
  11. public void SetValue(double newValue)
  12. {
  13. previousValue = currentValue;
  14. currentValue = newValue;
  15. }
  16.  
  17. public bool HasChanged()
  18. {
  19. return previousValue != currentValue;
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement