I have often wondered while typing “string” in Visual Studio (the IntelliSense shows string and String), what’s the difference between a string and String? NONE
Then why have two names for the same data type? One is the Base Class Library (BCL) name(String) and the other is a short form for it. Since these basic data types are frequently used we are given short forms which are much easier to use e.g. int for Int32.
For the compiler it doesn’t make any difference, whether you had used an int or Int32. Consider the IL (Intermediate Language) for the following piece of code:
IL Code:
Monday, May 31, 2010
String, string, Byte, byte, int, Int32....
Subscribe to:
Post Comments (Atom)
Home

0 comments:
Post a Comment