What is the difference between Int32 and int in C#?

Asked

Viewed 1,145 times

1

In C#, use String or string, Int32 or int, among others, there is no difference, in thesis. Anyone knows if this difference generates any impact on the performance of high complexity applications?

  • Here’s a piece of the answer.http://stackoverflow.com/questions/7074/whats-the-difference-between-string-and-string

  • If I’m not mistaken this question already exists on the site.

  • 1

    Anyway the answer is: it makes no difference. int is a nickname given by C# to the type System.Int32, as it occurs between string and System.String.

  • I soon saw why I did not find this question: the title is quite different than the question that was in my head. But there it explains exactly what I needed to know: the compiler who does the translation of these aliases, that is, this work is not for the machine that will execute the code. So it does not generate impact.

1 answer

1

Int and Int32 = are synonyms, what differs is that int32 the 32bits for those reading the code.

string is an alias for the class String that is there is no difference, if you use one or the other.

In short: It will not affect anything you use or other, there will be no impact on performance.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.