intptr in vb.net
-
Sir/Madam, I wanted to know the difference between integer and int32 .Basically in which situations we should use integer and in which situations we should use int32. Thanks and regards Pankaj Garg
Please don't ask twice. Your question has nothing to do with intptr. There are no situations I can think of where I'd use one over the other, in fact, I use int all the time, I'm not sure they are different ( unless int is not 32 bit, but I assume it is )
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Please don't ask twice. Your question has nothing to do with intptr. There are no situations I can think of where I'd use one over the other, in fact, I use int all the time, I'm not sure they are different ( unless int is not 32 bit, but I assume it is )
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Sir/Madam, I wanted to know the difference between integer and int32 .Basically in which situations we should use integer and in which situations we should use int32. Thanks and regards Pankaj Garg
There is no difference between Integer and Int32. Integer is the VB.Net alias for a System.Int32, a 32-bit signed integer.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Sir/Madam, I wanted to know the difference between integer and int32 .Basically in which situations we should use integer and in which situations we should use int32. Thanks and regards Pankaj Garg
It is best to only use types such as int32, int16 etc. when you need to guarentee a certain number of bits are used to store a value (whether that be numerical, bit flags, or just encoded data of a proprietory type). If you generally dont care how many bits it takes to store the value use a basic type, such as integer, long etc. The general purpose, from my point of view, for types such as int32 is to ensure portability of code across several platforms (as I mention above e.g. -- if you are using the bits in a variable to flag information you may need to ensure you have a minimum of 32 bits -- using a basic type like integer does not mean you will necessarily have a 32bit variable, although in the case of .Net this is actually true). Regards, Martin