473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
3 2428
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pat | last post by:
Hi, I want to write a int64 data into a file using fprintf(). In the fprintf argument, which one (%d or %u or other) should be used? Thanks. Pat
6
by: ESOJAY | last post by:
Is "typedef long long int64" the best way to define an int64 type in c? Are there better alternatives? Thanks, ESOJAY -- ESOJAY
3
by: Christopher Crooker | last post by:
We had a function with the signature: Function(Object *, DateTime, DateTime, EnumType) and then changed the class some and there was a 4 parameter function with the signature: ...
4
by: Simon Devlin | last post by:
Hi folks, I've been bashing my head against this all afternoon and am now totally baffled. Given this (a simple routine to turn a ip address string into an decimal) <snip> Dim Parts(3) as...
5
by: harishashim | last post by:
I have gone through necessary step and have been able to use a .Net libraries (created using C#) in VB6. It run good untill I try to use certain function in the library that is using Int64 type as...
14
by: cj | last post by:
VB2003. I need a large positive integer. Which is larger int64 or double? I see int64 also apparently is known as long and will hold -9,223,372,036,854,775,808 through...
1
by: Tao | last post by:
hi.. group, is there anyway that I can get a int64 from 2 int32? thanks.
12
by: Allen | last post by:
My C extension works wrong, and debug it, found that sizeof (INT64) = 4, not 8. I compile on Windows XP platform. Please tell me how to fix it to support INT64? Thanks.
3
by: Abubakar | last post by:
Hi, the project we are working on uses "int" for all integral type data (i have also declared size_t at some places where crt functions return size_t type). Now our application has to deal with...
3
by: Tim Sprout | last post by:
To convert hex to Int64 I can use: string hex = "413208A97245F5AE"; Int64 intFromHex = System.Convert.ToInt64(hex, 16); //intFromHex = 4697826885160531374 How do I reverse this, and convert...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.