Bug Vanquisher

29 November 2008

It Bit You In The Butt

Filed under: Bugz — Tanveer Badar @ 3:20 AM

new Guid( )

Fact 1: Guid is a value type.
Fact 2: Values types are initialized to all zero upon construction.
Fact 3: Value types cannot have default constructors.
Conclusion 1: new Guid( ) should earn you lots of spanking.
Conclusion 2: Guid.NewGuid( ) is the right thing to do.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

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

Blog at WordPress.com.

%d bloggers like this: