Use .ToArray() method, it Copies the Queue elements to a new array.
see below snippet
Queue<int> numbers = new Queue<int>();
numbers.Enqueue(1);
numbers.Enqueue(2);
numbers.Enqueue(3);
numbers.Enqueue(4);
int[] arrInt = numbers.ToArray();
foreach( int number in arr)
{
Console.WriteLine(number);
}</int></int>
I have take
int queue in
int array, if you have
string Queue, that needs to be convert in
int array, you might use convert.toInt32 method to convert it to int
Hope it helps