View Single Post
Old Jan 17th, 2007, 7:28 AM   #1
jonyzz
Programmer
 
jonyzz's Avatar
 
Join Date: Aug 2005
Location: null
Posts: 40
Rep Power: 0 jonyzz is on a distinguished road
Difference between double and Double in C#

Hi,
I was wondering if there is a difference between double and Double, between string and String, int and Int32 .. etc. in C#. I know that they all are primitive types, and that "int" for example is a synonym for Int32 in C#. But I was wondering - if int is a value type, does it mean that Int32 is a value type too? (it is a class as far as I know). And one more. Suggest we have the following code:

int i = 5;

Int32 i1 = 5;

i.ToString(); // i is boxed as far as i know

i1.ToString(); // is i1 boxed too ?

So i am wondering if Int32 is also being boxed.
Best regards
jonyzz is offline   Reply With Quote