static void Main(string[] args)
{
List<List<byte>> queue = new List<List<byte>>();
List<byte> com = new List<byte>();
com.Add(0X01);
com.Add(0X02);
queue.Add(com);
com.Clear();
com.Add(0X03);
com.Add(0X04);
queue.Add(com);
for (int i = 0; i < queue.Count; i++)
{
List<byte> temp = queue[i];
for (int j = 0; j < temp.Count; j++)
{
Console.Write("{0}", temp[j]);
}
}
}
结果0X01和0x02被覆盖了,输出结果是3434,这是怎么回事啊?求救啊!!!!!
{
List<List<byte>> queue = new List<List<byte>>();
List<byte> com = new List<byte>();
com.Add(0X01);
com.Add(0X02);
queue.Add(com);
com.Clear();
com.Add(0X03);
com.Add(0X04);
queue.Add(com);
for (int i = 0; i < queue.Count; i++)
{
List<byte> temp = queue[i];
for (int j = 0; j < temp.Count; j++)
{
Console.Write("{0}", temp[j]);
}
}
}
结果0X01和0x02被覆盖了,输出结果是3434,这是怎么回事啊?求救啊!!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货