Groups | Blog | Home
all groups > c# > november 2006 >

c# : outcome of: int i = new System.Int32(); ???


Arne_Vajhøj
11/25/2006 11:59:26 AM
[quoted text, click to view]

#3

Int32 is a struct and the same as int.

Arne
Brian Gideon
11/25/2006 4:41:14 PM

[quoted text, click to view]

Jeff,

What's causing the uncertainty about #3?

Brian
Jeff
11/25/2006 5:02:00 PM
Hey

I'm wondering what the outcome of this is C# code really is:
int i = new System.Int32();

Which one of these scenarios below describe what the outcome is:
#1: A new reference type instance of i set to zero
#2: An uninitialized i variable
#3: An initialized i variable set to zero

I originally thought #3 is the outcome, but i'm not sure any longer

Any suggestions?

Jeff

AddThis Social Bookmark Button