⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.aspx.vb

📁 對c#初學者參考..為課題asp.net 2.0教材代碼
💻 VB
字号:
Imports System
Imports System.Collections

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, _
            ByVal e As System.EventArgs) Handles Me.Load

        Dim scott As New Person("Scott", "Hanselman")
        Dim bill As New Person("Bill", "Evjen")
        Dim srini As New Person("Srinivasa", "Sivakumar")

        Dim peopleStack As New Stack()
        peopleStack.Push(scott)
        peopleStack.Push(bill)
        peopleStack.Push(srini)

        Dim x As Person = CType(peopleStack.Pop(), Person)
        Response.Write(x.FullName & "<BR/>")

        x = CType(peopleStack.Pop(), Person)
        Response.Write(x.FullName & "<BR/>")

        x = CType(peopleStack.Peek(), Person) 'Peek, not Pop
        Response.Write(x.FullName & "<BR/>")

        x = CType(peopleStack.Pop(), Person)
        Response.Write(x.FullName & "<BR/>")

    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -