What is the best way for checking empty strings (I'm not asking about initializing!) in C# when considering code performance?(see code below)
string a;
// some code here.......
if(a == string.Empty)
or
if(string.IsNullOrEmpty(a))
or
if(a == "")
any help would be appreciated. :)
String.Empty
instead of "", "" is not recommended to use, because it allocated new string – Karel Frajták Oct 24 '11 at 7:58