using System.Collections.Generic;
public static class StringExtensions
public static bool isEmpty(this string _str)
public static bool hasContent(this string _str)
return _str != null && _str.Length > 0;
public static void Main()
var strings = new List<string>()
foreach(var str in strings)
Console.WriteLine("isEmpty[" + str.isEmpty() + "]");
Console.WriteLine("hasContent[" + str.hasContent() + "]\n");