I am wondering if there is a special method/trick to check if a String
object is null. I know about the String.IsNullOrEmpty
method but I want to differentiate a null
String from an empty String (=""
).
Should I simply use:
if (s == null) {
// blah blah...
}
...or is there another way?
See Question&Answers more detail:os