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
Post a Comment