To be, or not to be (empty), that is the question... That's a simple, yet complex, question. First of all, when a string is not empty? For me, when there is at least one character or one number. Do it from scratch Let's create a custom function to achieve this functionality. { } ( ) public static bool IsStringEmpty myString string // do something Ok, now we have to think of how to check if the string myString is empty. Of course, the string must be not null. And must not be empty. Maybe... its length must be greater than zero? { myString== || myString == String.Empty || myString.Length == ; } ( ) public static bool IsStringEmpty myString string return null 0 Ok, we should be fine. But, what if the string contains only whitespaces? I mean, the string " ", passed to the method, will return true. IsStringEmpty If that's not what we want, we should include this check on the method. Of course, this implies a bit of complexity to check null values. { myString== || myString == String.Empty || myString.Length == || myString.Trim().Length == ; } ( ) public static bool IsStringEmpty myString string return null 0 0 Ok, we covered the most important scenarios. So we can try the method with our values: System; System.Collections.Generic; { { arr = List() { , , , String.Empty, }; ( txt arr) { Console.WriteLine( + IsStringEmpty(txt)); } } { (myString == ) ; myString = myString.Trim(); myString == String.Empty || myString.Length == ; } } using using public class Program ( ) public static void Main var new "1" null " " "hello" foreach string in "IsStringEmpty? " ( ) public static bool IsStringEmpty myString string if null return true return 0 will return IsStringEmpty? False IsStringEmpty? True IsStringEmpty? True IsStringEmpty? True IsStringEmpty? False Fine. Too tricky, isn't it? And we just reinvented the wheel. .NET native methods: String.IsNullOrEmpty and String.IsNullOrWhitespace C# provides two methods to achieve this result, and , with a subtle difference. String.IsNullOrEmpty String.IsNullOrWhiteSpace String.IsNullOrEmpty checks only if , so it doesn't recognize strings composed by empty characters. the string passed as parameter has at least one symbol String.IsNullOrWhitespace covers the scenario described in this post. It checks . both empty characters and for escape characters str1 = ; Console.WriteLine(String.IsNullOrEmpty(str1)); Console.WriteLine(String.IsNullOrWhiteSpace(str1)); str2 = ; Console.WriteLine(String.IsNullOrEmpty(str2)); Console.WriteLine(String.IsNullOrWhiteSpace(str2)); str3 = ; Console.WriteLine(String.IsNullOrEmpty(str3)); Console.WriteLine(String.IsNullOrWhiteSpace(str3)); str4 = ; Console.WriteLine(String.IsNullOrEmpty(str4)); Console.WriteLine(String.IsNullOrWhiteSpace(str4)); str5 = ; Console.WriteLine(String.IsNullOrEmpty(str5)); Console.WriteLine(String.IsNullOrWhiteSpace(str5)); string "hello" //False //False string null //True //True string "" //True //True string "\n \t " //False //True string " " //False //True You can see a live example . here Wrapping up As you can see, out of the box .NET provides easy methods to handle your strings. You shouldn't reinvent the wheel when everything is already done. Also published on Code4it .