xxxxxxxxxx
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
// Create a queue of tuples
Queue<(string, int)> tupleQueue = new Queue<(string, int)>();
// Enqueue tuples
tupleQueue.Enqueue(("John", 25));
tupleQueue.Enqueue(("Alice", 30));
tupleQueue.Enqueue(("Bob", 35));
// Dequeue and process tuples
while (tupleQueue.Count > 0)
{
var tuple = tupleQueue.Dequeue();
string name = tuple.Item1;
int age = tuple.Item2;
Console.WriteLine("Name: " + name + ", Age: " + age);
}
}
}