title: NSNumber, Setting and Retrieving
body: <p>I'm messing around with NSNumber for an iPhone app, and seeing what I can do with it.  For most of my variables, I simple store them as "int" or "float" or whatnot.  However, when I have to pass an object (Such as in a Dictionary) then I need them as an Object.  I use NSNUmber.  This is how I initialize the object.</p>
  
  <pre><code>NSNumber *testNum = [NSNumber numberWithInt:varMoney];
  </code></pre>
  
  <p>Where "varMoney" is an int I have declared earlier in the program.  However, I have absolutely no idea how to get that number back...</p>
  
  <p>for example:</p>
  
  <pre><code>varMoney2 = [NSNumber retrieve the variable...];
  </code></pre>
  
  <p>How do I get the value back from the object and set it to a regular "int" again?</p>
  
  <p>Thanks!</p>
  
  <p>(Out of curiosity, is there a way to store "int" directly in an Objective-C dictionary without putting it in an NSNumber first?)</p>