Queue<string> aa = new Queue<string> { };
Queue<string> bb = new Queue<string> { };
aa.Enqueue("a1");
aa.Enqueue("a2");
bb = aa; //浅拷贝,bb或者aa的值发生不变,都会变化--地址引用
bb.Dequeue(); //取出bb的值
Console.WriteLine("浅拷贝aa Queue count:" + aa.Count);
Console.WriteLine("浅拷贝bb Queue count:" + bb.Count);
bb = new Queue<string>(aa); //深拷贝,bb变化,aa不会变--值传递
bb.Dequeue();//取出bb的值
Console.WriteLine("深拷贝aa Queue count:" + aa.Count); //
Console.WriteLine("深拷贝bb Queue count:" + bb.Count);