.NET Queue is rotational.
Last active
January 9, 2017 19:04
-
-
Save kflu/8037f2503e99470b40fba2f09430591c to your computer and use it in GitHub Desktop.
.NET Queue is rotational.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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