title: using uint vs int
body: <p>I have observed for a while that C# programmers tend to use int everywhere, and rarely resort to uint. But I have never discovered a satisfactory answer as to why.</p>
  
  <p>If interoperability is your goal, uint shouldn't appear in public APIs because not all CLI languages support unsigned integers. But that doesn't explain why int is so prevalent, even in internal classes. I suspect this is the reason uint is used sparingly in the BCL.</p>
  
  <p>In C++, if you have an integer for which negative values make no sense, you choose an unsigned integer.</p>
  
  <p>This clearly signifies that negative numbers are not allowed or expected, and the compiler will do some checking for you. I also suspect in the case of array indices, that the JIT can easily drop the lower bounds check.</p>
  
  <p>However, when mixing int and unit types, extra care and casts will be needed.</p>
  
  <p>Should uint be used more? Why?</p>