if (int & int)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dirk Reske

    #1

    if (int & int)

    hello,

    how can I express this C++ statement in C#

    const DETAILS = 2;

    if (support & DETAILS)
    {
    .....
    }



  • Mountain Bikn' Guy

    #2
    Re: if (int & int)

    It's almost the same:

    const int DETAIL = 2;
    const int CHECK = 0; //or 1 or whatever you need

    if ((support & DETAIL) == CHECK)
    {
    ....
    }

    "Dirk Reske" <_Freak-2k@gmx.net> wrote in message
    news:unRRLuclDH A.2444@TK2MSFTN GP09.phx.gbl...[color=blue]
    > hello,
    >
    > how can I express this C++ statement in C#
    >
    > const DETAILS = 2;
    >
    > if (support & DETAILS)
    > {
    > ....
    > }
    >
    >
    >[/color]


    Comment

    • Lloyd Dupont

      #3
      Re: if (int &amp; int)

      Mountain Bikn' Guy was nearly right, but let me correct him:

      It's almost the same:

      const int DETAIL = 2;
      const int CHECK = 0; //or 1 or whatever you need (Not needed)

      if ((support & DETAIL) == DETAIL )
      {
      ....
      }
      there is also:
      if ((support & DETAIL) != 0)
      {
      ....
      }


      "Dirk Reske" <_Freak-2k@gmx.net> a écrit dans le message de news:unRRLuclDH A.2444@TK2MSFTN GP09.phx.gbl...[color=blue]
      > hello,
      >
      > how can I express this C++ statement in C#
      >
      > const DETAILS = 2;
      >
      > if (support & DETAILS)
      > {
      > ....
      > }
      >
      >
      >[/color]

      Comment

      • Mountain Bikn' Guy

        #4
        Re: if (int &amp; int)

        I guess it's been too long since I looked at C++

        "Lloyd Dupont" <net.galador@ld > wrote in message
        news:%23wKGROdl DHA.1948@TK2MSF TNGP12.phx.gbl. ..
        Mountain Bikn' Guy was nearly right, but let me correct him:

        It's almost the same:

        const int DETAIL = 2;
        const int CHECK = 0; //or 1 or whatever you need (Not needed)

        if ((support & DETAIL) == DETAIL )
        {
        ....
        }
        there is also:
        if ((support & DETAIL) != 0)
        {
        ....
        }


        "Dirk Reske" <_Freak-2k@gmx.net> a écrit dans le message de
        news:unRRLuclDH A.2444@TK2MSFTN GP09.phx.gbl...[color=blue]
        > hello,
        >
        > how can I express this C++ statement in C#
        >
        > const DETAILS = 2;
        >
        > if (support & DETAILS)
        > {
        > ....
        > }
        >
        >
        >[/color]


        Comment

        Working...