Is My String Empty? Some C# Performance Metrics
Update (25/02/2006) – Hey, we now have String.IsNullOrEmpty, you know! What’s the quickest way, in C#, to test whether a string is empty? This is a question which came to my mind yesterday. I’ve always been fond of: but it occured to me that this necessitates the creation and destruction of a second object (the empty string with which we’re comparing), so maybe it would be quicker to write: ...