title: Override objects return value
body: <p>I'm trying to compare an object with an int value such as</p>
  
  <pre><code>if (myObject - 5 == 0)
      doSomething();
  </code></pre>
  
  <p>my class could look something like this: <em>(most setters/getters removed, so don't mind that all variables are private)</em></p>
  
  <pre><code>public class SomeClass
  {
      public string name;
      private int minValue;
      private int maxValue;
      private int currValue;
  
      public int getCurrentValue()
      {
          return currValue;
      }
  }
  </code></pre>
  
  <p>What I'm trying to achieve is something like this:</p>
  
  <pre><code>someClassInstance - 5;
  </code></pre>
  
  <p>to be equal</p>
  
  <pre><code>someClassInstance.getCurrentValue() - 5;
  </code></pre>
  
  <p>Can I make an override for the object to act as an int (it's own variable) opposed to just being an object?</p>