String.IsNullOrEmpty : update on that nasty null reference exception

Back in April 2006, I blogged about a nasty JIT compiler optimisation that would cause String.IsNullOrEmpty to throw a null reference exception;  ironic really given that is the very thing you’d use the IsNullOrEmpty method to check against.  Well since then, due to popular demand on the connect site, this bug has been fixed in .NET 2.0 SP1 (which implies .NET 3.0 and 3.5)

940900 (http://support.microsoft.com/kb/940900/ ) FIX: You receive the NullReferenceException exception when you call the String.IsNullOrEmpty function in an application that is built on the .NET Framework 2.0

This entry was posted in 2087, 491, 493, 5726, 6183, 6184, 7099, 7341. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>