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
Post a Comment