Reputation: 4900
Related:
The linked question asks whether it is "safe to assume that an int will always be 32 bits in C#". The accepted answer states that "the C# specification rigidly defines that int is an alias for System.Int32 with exactly 32 bits".
My question is this: does this hold true for VB.Net's Integer? Is it safe to assume that Integer will always be an alias for int32?
Upvotes: 1
Views: 184
Reputation: 416131
VB.Net doesn't have an "int", it has an "Integer" type. The Integer type is an alias for System.Int32. So no, this will not change.
Upvotes: 0
Reputation: 888185
Yes.
The Integer
type will never change.
The spec (7.3 Primitive Types) says:
The integral value types Byte (1-byte unsigned integer), Short (2-byte signed integer), Integer (4-byte signed integer), and Long (8-byte signed integer). These types map to System.Byte, System.Int16, System.Int32, and System.Int64, respectively. The default value of an integral type is equivalent to the literal 0.
Upvotes: 7