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?
In C# the language-defined keywords for data types are just aliases for their respective BCL types. So int is exactly the same as Int32, long is the same as Int64, 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With