E
Ender
Let's assume you are developing a database application and you have an
ID field. You setup the ID field in the database as a 1 up increment
starting at zero.
Whenever I see programs, everyone always uses the int field to
represent the userID. Should this really be a uint since the field
will never be negative, only positive? Is there a performance penalty
using the uint type?
Furthermore, let's say I am building an application where I have
numbers that will only be positive. Should uint be user here? Again,
I almost always see int used, even if the business rules state the
number will never be negative.
Thanks
Endymion Keats
ID field. You setup the ID field in the database as a 1 up increment
starting at zero.
Whenever I see programs, everyone always uses the int field to
represent the userID. Should this really be a uint since the field
will never be negative, only positive? Is there a performance penalty
using the uint type?
Furthermore, let's say I am building an application where I have
numbers that will only be positive. Should uint be user here? Again,
I almost always see int used, even if the business rules state the
number will never be negative.
Thanks
Endymion Keats