Eventuali duplicati:
Checking for string contents? string Length Vs Empty StringIn .NET, che è il migliore, mystring.Length == 0 o mystring == string.Empty?
In .NET, che è meglio,
if (mystring.Length == 0)
o
if (mystring == string.Empty)
sembra che questi avrebbero avuto lo stesso effetto , ma quale sarebbe il migliore beh ind le scene?
c'è un motivo funzionale, si non stai facendo String.IsNullOrEmpty (mystring)? – JustLoren
http://stackoverflow.com/questions/151472/what-is-the-difference-between-string-empty-and, http://stackoverflow.com/questions/810442/whats-the-most-efficient-way -determinare-se-una-non-taglia-stringa-è-vuoto-i – womp
Non lo sapevo fino ad ora! :-) Woot stackoverflow .... – Matt