c# - I don't understand a piece of someones answer -


this odd question in someones else's answer in different question posted following

try {    pingreply reply = pinger.send(nameoraddress);    pingable = reply.status == ipstatus.success; } 

how pingable = reply.status == ipstatus.success; work? me looks if statement without if.

reply.status == ipstatus.success  

will return boolean assigned pingable variable.

same thing happen inside if statement: first expression calculated, true or false result, , result checked branch condition.


Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -