Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

simple if-else statement

$
0
0

hey guys
Literally a minute ago my if else statement checking if my active directory attributes are null was working but now I keep on getting the error operator "!" can not be applied to string.

string firstName;

if(!(firstName = null)){

firstName = convert.ToString(found.Name);

}

else{

firstName = "unknown"

}

i declare the string right before it


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>