Skip to content

Instantly share code, notes, and snippets.

@kflu
Last active January 9, 2017 19:04
Show Gist options
  • Save kflu/8037f2503e99470b40fba2f09430591c to your computer and use it in GitHub Desktop.
Save kflu/8037f2503e99470b40fba2f09430591c to your computer and use it in GitHub Desktop.
.NET Queue is rotational.

.NET Queue is rotational.

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication24
{
class Program
{
static void Main(string[] args)
{
var q = new Queue<int>(4);
q.Enqueue(1);
q.Enqueue(2);
q.Enqueue(3);
q.Enqueue(4);
q.Dequeue();
q.Dequeue();
q.Dequeue();
q.Enqueue(5);
var x = q.ToArray();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment