Comparing set of bits in byte array
        Posted  
        
            by Spaniard
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Spaniard
        
        
        
        Published on 2010-02-10T10:50:53Z
        Indexed on 
            2010/06/16
            6:02 UTC
        
        
        Read the original article
        Hit count: 315
        
Hello!
I have a byte array, as follows:
byte[] array = new byte[] { 0xAB, 0x7B, 0xF0, 0xEA, 0x04, 0x2E, 0xF3, 0xA9};
The task is to find the quantity of occurrences '0xA' in it. Could you advise what to do? The answer is 6.
© Stack Overflow or respective owner