Hi
IM trying to make a queue of Byte[] every time i click on a button , Very Strait Foreword
System.Collections.Queue Myqueue= new System.Collections.Queue(20);
public byte[] Bytearray = new byte[2];
Myqueue.Clear();
while (Myqueue .Count !=20)
{
Temp=Calc(Bytearray);
Bytearray[0] = temp[8];
Bytearray[1] = temp[13];
Myqueue.Enqueue(Bytearray);
}
So the Loop is done 20 times, BUT all the Data in the queue are the same!
so the first time Bytearray is [9][66] , then its [3][21] , then all the Queue is [3][21] and when Bytearray is [0][5] all the queue is [0][5] and so on !
Of course temp is changing and i checked that in the debugging and by printing its values on the screen
As u can see in the Attached Image
[IMG]http://i670.photobucket.com/albums/vv69/fx2236/Capture.jpg[/IMG]
Am i doing something wrong here or is it a bug or just Bad programming Skills which i know i have!