Пример #1
0
        public void AddTest()
        {
            var buff = new CircularBag <int>(10);

            for (int i = 0; i < 20; i++)
            {
                buff.Add(i);
            }

            for (int i = 0; i < buff.Length; i++)
            {
                Console.WriteLine(buff[i]);
            }
        }
Пример #2
0
 private void Timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     timer.Stop();
     buffer.Add(performanceCounter.NextValue());
     timer.Start();
 }