C# Queue ToString
Description
Queue ToString
returns a string that represents the current
object.
Syntax
Queue.ToString
has the following syntax.
public virtual string ToString()
Returns
Queue.ToString
method returns A string that represents the current object.
Example
/*from w ww. ja va2s . c o m*/
using System;
using System.Collections;
public class SamplesQueue {
public static void Main() {
Queue mySourceQ = new Queue();
mySourceQ.Enqueue( "1" );
mySourceQ.Enqueue( "2" );
mySourceQ.Enqueue( "3" );
Console.WriteLine(mySourceQ.ToString());
}
}
The code above generates the following result.