public static QueueDMA ReadStringQueueFROMfile(string filename) { QueueDMA queue = new QueueDMA(); StreamReader reader = new StreamReader(filename, Encoding.Default); string str = String.Empty; while ((str = reader.ReadLine()) != null) { queue.Add(str); } reader.Close(); return(queue); }
public static void RemoveXnames(QueueDMA queue, char x) { string element = String.Empty; int initialSize = queue.Count; //no additional queues for (int i = 0; i < initialSize; i++) { element = queue.TakeFirst(); if (element[0] != x) { queue.Add(element); } } }