After every Enqueue() all the values in the Queue become the same
问题 I'm receiving some data over a socket and trying to add it to a Queue so it can be dequeued by another thread that is much more slow, something like a buffer. The problem is that everytime I enqueue a new value, all the values in the queue become that. byte[] aux = new byte[1464]; aux = (byte[])ar.AsyncState; //add the package to the package fifo list lock (lockPktBuffer) { packetBuffer.Enqueue(aux); } First I thought that I was passing a pointer, so all the entries are just pointing to the