What is the different between stringvariable != NullValue.String and !string.IsNullOrEmpty(stringvariable) in asp.net? -


is there different between stringvariable != nullvalue.string , !string.isnullorempty(stringvariable) in asp.net ? best ?

the first tests string isn't "".

as strings can null (because references) test fail.

by using isnullorempty wrapping:

if (string != null && string.length > 0) 

in 1 test.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -