c# - Most efficient way to reverse the order of a BitArray? -


i've been wondering efficient way reverse order of bitarray in c#. clear, don't want inverse bitarray calling .not(), want reverse order of bits in array.

cheers, chris

public void reverse(bitarray array) {     int length = array.length;     int mid = (length / 2);      (int = 0; < mid; i++)     {         bool bit = array[i];         array[i] = array[length - - 1];         array[length - - 1] = bit;     }     } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -