swordoftruth
asked on
Reading from an SystemArray into an ArrayList???
HI im trying to read from an array into an arraylist but it keeps on throwing an outofbounds exception,
Numbytes= 1
BufBytes=1
byte[] BufBytes;
ArrayList allBytes = new ArrayList();
while(count != 0)
{
ReadFile(hComm, BufBytes,NumBytes,ref BytesRead, zero);
count = BytesRead;
allBytes[i++] = BufBytes[0];
}
caN ANYONE HELP!!
Numbytes= 1
BufBytes=1
byte[] BufBytes;
ArrayList allBytes = new ArrayList();
while(count != 0)
{
ReadFile(hComm, BufBytes,NumBytes,ref BytesRead, zero);
count = BytesRead;
allBytes[i++] = BufBytes[0];
}
caN ANYONE HELP!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is the code you should be using
allBytes.Add(BuffBytes[0])
Hope this helps