using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DemoQueue4 { class SpecialQueue : System.Collections.Generic.Queue { public SpecialQueue join(Queue other) { SpecialQueue result = new SpecialQueue(); ELEMENT[] data = this.ToArray(); foreach (ELEMENT e in data) { result.Enqueue(e); } data = other.ToArray(); foreach (ELEMENT e in data) { result.Enqueue(e); } return result; } } }