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

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -