Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Queue with Queue Data type
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rextester { public class Program { public static void Main(string[] args) { //Create Queue with Queue Data type Queue que = new Queue(); que.Enqueue(2); que.Enqueue(4); que.Enqueue(6); que.Enqueue(8); printStack(que); que.Dequeue(); que.Dequeue(); printStack(que); } public static void printStack(Queue que){ Console.WriteLine("\n Queue elements"); foreach (int i in que) { Console.WriteLine(i); } Console.WriteLine("Number of elements in the stack " + que.Count); Console.WriteLine("Does queue contain the number 4 "+ que.Contains(4)); } } }
run
|
edit
|
history
|
help
0
4x4 ver 3
Local Time (DateTime)
.net Q4
Working with Dictionaries (csharp)
Order of Ops 6.0 (Added Easy and Medium)
generics one more doubt-stack overflow exception
莊王嫩
Testing 003
Imp
Update 2D Array