示例#1
0
        public static string MyQueueToString(MyQueue q)
        {
            string s = Convert.ToString(q.OutQueue());

            while (!q.QueueIsEmpty())
            {
                s += "\r\n" + Convert.ToString(q.OutQueue());
            }
            return(s);
        }
示例#2
0
        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();
        }