Exemple #1
0
	    public void Foo2()
		{
			var queue = new CappedQueue<int>(5);
			
			queue.Enqueue(10);
			queue.Enqueue(20);
			queue.Enqueue(30);
			
			var average = queue.Sum() / queue.Count();
		}
	    public void Foo()
		{
			var queue = new CappedQueue<DateTime>(5);
			
			queue.Enqueue(DateTime.Now); // each time the user press the key
			queue.Enqueue(DateTime.Now); // each time the user press the key
			queue.Enqueue(DateTime.Now); // each time the user press the key
			
			
			TimeSpan diff = (queue.Last() / queue.Fisrt())/queue.Count();
		}