Queue.ToArray Method |
System.Collections.Queue
queuevariable .ToArray( )
An Array of type Object
This method creates an array of type Object, copies the elements of the queue in order to that array, and then returns the array.
Unlike the CopyTo method, we do not need to define an array in advance. However, we cannot specify the starting array index for the copy procedure using ToArray.