String.IsNullOrEmpty

C# 2.0 Tip: You no longer need to write the following code:

if (null != someString && someString.Length > 0) { … }

Instead you can now just write the following:

if (String.IsNullOrEmpty(someString)) { … }

One thought on “String.IsNullOrEmpty

Comments are closed.