Using .NET System.Collections.Stack from ASP

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

Output

3
Nagao
Zendhi
Fabio
Nagao
Zendhi
Fabio

Sources

/dot-NET/System.Collections.Stack.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.Stack from ASP</h1>
<p>
	More info about System.Collections.Stack class at <a href="https://msdn.microsoft.com/en-us/library/System.Collections.Stack.aspx">MSDN Library</a>.
</p>
<h2>Output</h2>
<div class="code"><pre><%

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

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

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

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

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

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

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

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

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

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

'TypeName   : System.Collections.Stack
'Name       : Pop
'MemberType : Method
'Definition : System.Object Pop()

'TypeName   : System.Collections.Stack
'Name       : Push
'MemberType : Method
'Definition : void Push(System.Object obj)

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

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

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

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

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

dim Stack, entry

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

Stack.push "Fabio"
Stack.push "Zendhi"
Stack.push "Nagao"

Response.write( Stack.count & vbNewline )

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

Response.write( Stack.pop() & vbNewline )
Response.write( Stack.pop() & vbNewline )
Response.write( Stack.pop() & vbNewline )

set Stack = 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>