<%@ Page Language="VB" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
Stack<int> myStack = new Stack<int>();
myStack.Push(5);
myStack.Push(3);
myStack.Push(10);
Array myArray;
myArray = myStack.ToArray();
int x = 0;
foreach (int item in myArray)
{
x += item;
}
Label1.Text = x.ToString();
}
</script>
|