Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var buffer = new CircularBuffer(capacity: 3);
            while (true)
            {
                var parsed = false;
                var value = 0.0;
                var input = Console.ReadLine();

                if (double.TryParse(input, out value))
                {
                    buffer.Write(value);
                }
                break;
            }
            Console.WriteLine("Buffer ");
            while (!buffer.IsEmpty)
            {
                Console.WriteLine("\t" + buffer.Read());

            }
        }