By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,162 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,162 IT Pros & Developers. It's quick & easy.

int/Int32/Int64 on 64-bit Processors and 64-bit OS.

P: n/a
Hi folks,
I would like to know whether the "int" data type (in .NET Framework)
is considered as Int32 on 64bit processors too? Any help would be
highly appreciated,

Cheers,
Mehdi

Feb 6 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Mehdi,
In C#, "int" means Int32, "long" means Int64. MSDN link:

http://msdn2.microsoft.com/en-us/library/5kzh1b5w.aspx

John

On Feb 6, 6:17 am, "mehdi" <mehdi.mous...@gmail.comwrote:
Hi folks,
I would like to know whether the "int" data type (in .NET Framework)
is considered as Int32 on 64bit processors too? Any help would be
highly appreciated,

Cheers,
Mehdi

Feb 6 '07 #2

P: n/a
Yes; int is defined in the C# language specification as Int32; it does
not depend on the processor.

IntPtr, on the otherhand, changes for each runtime - which means you
can let the system deal with this abstraction, without worrying about
your "int" code changing behavior.

Marc
Feb 6 '07 #3

P: n/a
Mehdi,

Unlike c++ where the int is platform dependant in C# the type sizes are
stirctly fixed (except IntPtr, which depends on the machine word).
int is Int32
--
HTH
Stoitcho Goutsev (100)

"mehdi" <me***********@gmail.comwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
Hi folks,
I would like to know whether the "int" data type (in .NET Framework)
is considered as Int32 on 64bit processors too? Any help would be
highly appreciated,

Cheers,
Mehdi

Feb 6 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.