I need to take my BitArray and convert it to a Int32. I havent found any ways to do this using the BitArray class. Am i missing something?...Simply casting it didnt work either.
Heres my code (Its for converting Big-Endian values, It reads 4 bytes ahead and the file and determines the value, Open to suggestions on that code too but this problem came up first so i cant even test it)
public BitArray NullBits(BitArray bits, int index)<br/>
{<br/>
for (int i = index; i < bits.Length; i++)<br/>
{<br/>
bits[i] = false;<br/>
}<br/>
return bits;<br/>
}<br/>
public BitArray RemoveEndianBits(BitArray bits)<br/>
{<br/>
//How many Values to shift over<br/>
int shift = 1;<br/>
//For each bit<br/>
for (int i = 0; i < bits.Length; i++)<br/>
{<br/>
if ((i+1 % 8) == 0)<br/>
{<br/>
shift+= 1;<br/>
}<br/>
if (i + shift < bits.Length)<br/>
{<br/>
bits[i] = bits[i + shift];<br/>
}<br/>
else<br/>
{<br/>
bits[i] = false;<br/>
}<br/>
}<br/>
return bits;<br/>
}<br/>
public int ReadValue(FileS

**View Complete Post**

## Failed To Convert Parameter Value From A String To A Int32