Convert.ToInt32(null) == 0

2008-04-25 at 11:00 am (Pennidren)

Consider the following.

string s = null;

int i = Convert.ToInt32(s);

What is the value of i?  Zero.  WHAT?

GIVE ME A DAMN EXCEPTION. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.