public static string MyQueueToString(MyQueue q) { string s = Convert.ToString(q.OutQueue()); while (!q.QueueIsEmpty()) { s += "\r\n" + Convert.ToString(q.OutQueue()); } return(s); }
public void MyQueueToFile(MyQueue q) { FileStream f3 = new FileStream(PathFileInput, FileMode.Create); StreamWriter writer = new StreamWriter(f3); while (!q.QueueIsEmpty()) { writer.WriteLine(Convert.ToString(q.OutQueue())); } writer.Close(); f3.Close(); }