Using .NET System.Collections.Queue from ASP

More info about System.Collections.Queue class at MSDN Library.

Output

3
Fabio
Zendhi
Nagao
Fabio
Zendhi
Nagao

Sources

/dot-NET/System.Collections.Queue.asp

<%@ language="VBScript" %>
<!--#include virtual="/lib/unit-tests.asp"-->
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link href="/lib/unit-tests.css" rel="stylesheet" type="text/css" />
<h1>Using .NET System.Collections.Queue from ASP</h1>
<p>
	More info about System.Collections.Queue class at <a href="https://msdn.microsoft.com/en-us/library/System.Collections.Queue.aspx">MSDN Library</a>.
</p>
<h2>Output</h2>
<div class="code"><pre><%

' PS> new-object System.Collections.Queue | gm | format-list > System.Collections.Queue.txt

'TypeName   : System.Collections.Queue
'Name       : Clear
'MemberType : Method
'Definition : void Clear()

'TypeName   : System.Collections.Queue
'Name       : Clone
'MemberType : Method
'Definition : System.Object Clone(),
'             System.Object ICloneable.Clone()

'TypeName   : System.Collections.Queue
'Name       : Contains
'MemberType : Method
'Definition : bool Contains(System.Object obj)

'TypeName   : System.Collections.Queue
'Name       : CopyTo
'MemberType : Method
'Definition : void CopyTo(array array, int index),
'             void ICollection.CopyTo(array array, int index)

'TypeName   : System.Collections.Queue
'Name       : Dequeue
'MemberType : Method
'Definition : System.Object Dequeue()

'TypeName   : System.Collections.Queue
'Name       : Enqueue
'MemberType : Method
'Definition : void Enqueue(System.Object obj)

'TypeName   : System.Collections.Queue
'Name       : Equals
'MemberType : Method
'Definition : bool Equals(System.Object obj)

'TypeName   : System.Collections.Queue
'Name       : GetEnumerator
'MemberType : Method
'Definition : System.Collections.IEnumerator GetEnumerator(),
'             System.Collections.IEnumerator IEnumerable.GetEnumerator()

'TypeName   : System.Collections.Queue
'Name       : GetHashCode
'MemberType : Method
'Definition : int GetHashCode()

'TypeName   : System.Collections.Queue
'Name       : GetType
'MemberType : Method
'Definition : type GetType()

'TypeName   : System.Collections.Queue
'Name       : Peek
'MemberType : Method
'Definition : System.Object Peek()

'TypeName   : System.Collections.Queue
'Name       : ToArray
'MemberType : Method
'Definition : System.Object[] ToArray()

'TypeName   : System.Collections.Queue
'Name       : ToString
'MemberType : Method
'Definition : string ToString()

'TypeName   : System.Collections.Queue
'Name       : TrimToSize
'MemberType : Method
'Definition : void TrimToSize()

'TypeName   : System.Collections.Queue
'Name       : Count
'MemberType : Property
'Definition : int Count {get;}

'TypeName   : System.Collections.Queue
'Name       : IsSynchronized
'MemberType : Property
'Definition : bool IsSynchronized {get;}

'TypeName   : System.Collections.Queue
'Name       : SyncRoot
'MemberType : Property
'Definition : System.Object SyncRoot {get;}

dim Queue, entry

set Queue = Server.createObject("System.Collections.Queue")

Queue.enqueue "Fabio"
Queue.enqueue "Zendhi"
Queue.enqueue "Nagao"

Response.write( Queue.count & vbNewline )

for each entry in Queue
    Response.write( entry & vbNewline )
next

Response.write( Queue.dequeue() & vbNewline )
Response.write( Queue.dequeue() & vbNewline )
Response.write( Queue.dequeue() & vbNewline )

set Queue = nothing

%></pre></div>
<hr />
<h2>Sources</h2>
<h3><%= Request.ServerVariables("SCRIPT_NAME") %></h3>
<div class="code"><%= geshify( loadTextFile( Server.mapPath( Request.ServerVariables("SCRIPT_NAME") ) ), "asp" ) %></div>