Should I use int or Int32

前端 未结 30 2158
野性不改
野性不改 2020-11-22 11:52

In C#, int and Int32 are the same thing, but I\'ve read a number of times that int is preferred over Int32 with no reason

30条回答
  •  伪装坚强ぢ
    2020-11-22 12:38

    You should not care. If size is a concern I would use byte, short, int, then long. The only reason you would use an int larger than int32 is if you need a number higher than 2147483647 or lower than -2147483648.

    Other than that I wouldn't care, there are plenty of other items to be concerned with.

提交回复
热议问题