dominicwong
asked on
How to check an empty string in C#
Hi experts
I am trying to check for an empty string but I wonder why the following doesn't work.
string s = " "; // two empty spaces.
bool flag = string.IsNullOrEmpty(s); // gives false.
I am trying to check for an empty string but I wonder why the following doesn't work.
string s = " "; // two empty spaces.
bool flag = string.IsNullOrEmpty(s); // gives false.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to the prompts responses and help from everyone. I appreciate that.