I have to query array of strings from SQL using this code:
defaultMail = getDefaultMailList(requester);
and the sql query string is
SELECT * FROM dbo. ....
Then, I get array of string from the getDefaultMailList
method:
string toEmail = defaultMail[0];
string ccEmail = defaultMail[1];
Then, I use the value of SQL query to make a condition of if else like this.
if (ccEmail != "")
{
do something
}
Now, I met the problem when SQL query returns null
value. The ccList != ""
still returns TRUE
, but I want to make it return FALSE
.
How to handle with this problem?
Thank you.