Dimitri C.
Dimitri C.

Reputation: 22496

What is the difference between uint and System.UInt32?

Is there a difference, or are they just aliases?

Upvotes: 11

Views: 15632

Answers (6)

Sowmya.C
Sowmya.C

Reputation: 61

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).

Upvotes: 6

missingfaktor
missingfaktor

Reputation: 92036

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

Upvotes: 4

QrystaL
QrystaL

Reputation: 4966

They are aliases but:

enum A : uint
{
    // This code compiles
}

enum A : UInt32
{
    // Compile error
}

Upvotes: 7

Anton Gogolev
Anton Gogolev

Reputation: 115731

Yes, they are aliases. Here's the full list.

Upvotes: 21

Henri
Henri

Reputation: 5113

There is no difference they are aliasses.

Upvotes: 10

Related Questions