using System.Collections.Generic;
public static void Main()
char[] extraGrade = { 'A', 'B', 'C' };
Queue<char> grades = new Queue<char>(extraGrade);
Console.WriteLine("---------Enqueue() : To add items---------");
foreach (char grade in grades)
Console.WriteLine(grade);
Console.WriteLine("\n---------Peek() : To get first item---------");
Console.WriteLine(grades.Peek());
Console.WriteLine("\n---------Contains() : Check and return Boolean if B exists in the collection---------");
Console.WriteLine(grades.Contains('B'));
Console.WriteLine("\n---------Count : To get total items---------");
Console.WriteLine(grades.Count);
Console.WriteLine("\n---------Dequeue() : To remove first item---------");
Console.WriteLine(grades.Dequeue());
Console.WriteLine($"\nTotal items in collection : {grades.Count}");
Console.WriteLine("\n---------Return removed items from queue using While loop---------");
Console.WriteLine(grades.Dequeue());
Console.WriteLine($"\nTotal items in collection : {grades.Count}\n");
grades = new Queue<char>(extraGrade);
Console.WriteLine("\n---------Clear() : Remove all the items---------");
Console.WriteLine($"\nTotal items in collection before Clear() : {grades.Count}");
Console.WriteLine($"\nTotal items in collection after Clear() : {grades.Count}");