9

Is there a difference, or are they just aliases?

thecoop
  • 45,220
  • 19
  • 132
  • 189
Dimitri C.
  • 21,861
  • 21
  • 85
  • 101

6 Answers6

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
9

There is no difference they are aliasses.

Henri
  • 5,065
  • 23
  • 24
7

They are aliases but:

enum A : uint
{
    // This code compiles
}

enum A : UInt32
{
    // Compile error
}
QrystaL
  • 4,886
  • 2
  • 24
  • 28
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).

cHao
  • 84,970
  • 20
  • 145
  • 172
Sowmya.C
  • 51
  • 1
  • 1
3

Nothing. uint is just an alias for System.UInt32.

missingfaktor
  • 90,905
  • 62
  • 285
  • 365
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