title: 0 not an [int] in PowerShell?
body: <p>My understanding is that (mathematically) 0 is an Int. And yet </p>
  
  <pre><code>if (0 -as [int]){"Int"}else{"Not"}
  </code></pre>
  
  <p>returns <code>Not</code>, at least for me in PS 2.0.</p>
  
  <p>Is this a bug in v2, or am I misunderstanding things? 
  I have worked around the issue by testing for <code>-as [int] -and -ne 0</code>, but that is rather kludgy feeling, so I am hoping I am missing something here and there is a better answer.</p>
  
  <p>FYI, I am specifically dealing with a seed computer name that needs an initial index added or a last computer name that needs an index incremented. The seed looks like <strong>Lab 1-</strong>, and the initial index could be 0 or could be 1 depending on the situation. I had been just testing for the last character to be <code>[int]</code>, knowing that - would not be an int. But when the first computer was <strong>Lab 1-00</strong> because the initial index was 0, I also get not <code>[int]</code> and things get ugly, with the next computer being <strong>Lab 1-0000</strong>.
  Again, the additional conditional is working, just wondering if I am misunderstanding in my expectation that 0 is an <code>[int]</code>.</p>