Is there a difference, or are they just aliases?
Asked
Active
Viewed 1.4k times
9
-
See: http://stackoverflow.com/questions/62503/c-int-or-int32-should-i-care – Finglas Jan 15 '10 at 11:58
6 Answers
20
Yes, they are aliases. Here's the full list.

Anton Gogolev
- 113,561
- 39
- 200
- 288
-
I prefer the UInt32 since in some programming languages (C, not C#), the sizes of "int" and "uint" depend on the system you are working on. – Thorkil Værge Apr 05 '18 at 23:39
7
They are aliases but:
enum A : uint
{
// This code compiles
}
enum A : UInt32
{
// Compile error
}

QrystaL
- 4,886
- 2
- 24
- 28
-
1
-
I don't know the clear answer =) There's some discussion here: http://stackoverflow.com/questions/1813408/c-int-int32-and-enums – QrystaL Jan 15 '10 at 11:57
5
uint
is a C# data type and
System.UInt32
is a .Net data type(or the data types which CLR has).
The C# data type is translated in to .Net data type when the program is run. All the other programming languages'(that work in .Net) data types will be translated into equivalent .Net data types when run. All the data type of the programming languages including C# must adhere to CTS(Common Type System).
2
It's just an alias: http://blogs.msdn.com/csharpfaq/archive/2004/03/12/88418.aspx

Jan-Patrick Ahnen
- 1,380
- 6
- 17
- 31