Queue programming in c#

Jitendrasoft09
Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 714
using System;
using System.Collections.Generic;

namespace MyExample {
class JkExample {

static void Main(string[] args) {


Queue<string> queue = new Queue<string>();
queue.Dequeue();
queue.Enqueue("BE");
queue.Enqueue("ME");
queue.Enqueue("DE");

foreach (string s in queue) {
Console.WriteLine("Queue Item: {0}", s);
}


Console.ReadLine();
}
}
}

Comments or Responses

Login to post response