Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Confused by ASP.NET c# and the "==" statement!

  • 11-07-2007 08:52AM
    #1
    Moderators, Society & Culture Moderators Posts: 2,687 Mod ✭✭✭✭


    What will user status be set to in the OR part of this statement, i.e. what does the == mean?
    userStatusCorrect = false;
    if(secondUser == true)
    {
    userStatusCorrect = userStatusCorrect || (statusApp [COLOR="Blue"][B]==[/B][/COLOR] status);
    }
    


Comments

  • Registered Users, Registered Users 2, Paid Member Posts: 14,174 ✭✭✭✭Lemming


    Morph&#233 wrote: »
    i.e. what does the == mean?

    The parenthesis in the example
    (statusApp == status)
    

    will evaluate with either a true or false result, dependant on what the values of both variables are going into the conditional statement, i.e. is the value of statusApp equal to the value of status, yes or no?


  • Moderators, Society & Culture Moderators Posts: 2,687 Mod ✭✭✭✭Morpheus


    I hate fixing other peoples code and I hate shortcuts, thanks for the reply.


  • Registered Users, Registered Users 2 Posts: 2,157 ✭✭✭dazberry


    Morph&#233 wrote: »
    I hate fixing other peoples code and I hate shortcuts
    userStatusCorrect = secondUser && (statusApp == status);
    

    D.


Advertisement