When should I use:
Int32 myint = 0;//Framework data type
vs
int myint = 0;//C# language data type
What are the similarities/differences? I seem to recall being told that there are performance differences? Is this true?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In C# the language-defined keywords for data types are just aliases for their respective BCL types. So
intis exactly the same asInt32,longis the same asInt64, etc.In general I’d think it’s best to stick with the language-defined type names, though. There are definitely no performance differences as those aliases are resolved by the compiler.