binary check (how to?)

Results 1 to 2 of 2

Thread: binary check (how to?)

  1. #1
    Join Date
    Dec 1969

    Default binary check (how to?)

    How can I do a binary check in ASP.NET? <BR><BR>When I got a numberic variable that contains &#039;11&#039;. I want to check if &#039;8&#039; exists, how to do this. 11 = 1+2+8, so I need a "true" as return. If I check on &#039;4&#039; in &#039;11&#039; is must be false.<BR><BR>In classic ASP this works: <BR><BR>If (Clng(myReader("Mailing")) AND 1) then xxxxxxxxxx

  2. #2
    Join Date
    Dec 1969

    Default RE: binary check (how to?)

    its Pretty much the same in <BR>You would basically use AND with the number you are trying to check.<BR><BR>Dim x as Integer = 11<BR><BR>if ((x AND 8) = 8) Then<BR><BR>End if<BR><BR>or...<BR><BR>if ((x AND 2) = 2) Then

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts