I just tried to implement a class where numerous properties are length / count, etc. uint instead of int . However, while doing this, I noticed that it really hurts, as if no one really wants it.
Almost everything that distinguishes an integral type returns an int , so it needs to be dropped at several points. I wanted to build a StringBuffer with its default buffer length for one of the fields of this class. A cast is also required.
So, I was thinking if I just need to go back to int here. In any case, I do not use the entire range. I just thought that what I am dealing with simply cannot be negative (if that were the case, it would be a mistake), it would be a good idea to use uint .
PS: I saw this question , and this at least explains why the framework itself always uses int , but even in the native code it is actually cumbersome to stick to uint , which makes me think that this, apparently, is not really required.
c # integer
Joey Jan 6 '10 at 13:17 2010-01-06 13:17
source share