• 您的位置我爱Aspx >> VB.Net >> Me关键字在.NET中的使用(转)
  • Me关键字在.NET中的使用(转)

  • 作者:aspxer  来源:internet  日期:2007-5-20 14:02:05  关键字:.net
  • Public Class Form1

    Inherits System.WinForms.Form

    Public Sub New()

    MyBase.New()

    Form1 = Me

    @#This call is required by the Win Form Designer.

    InitializeComponent()

    @#TODO: Add any initialization after the InitializeComponent() call

    End Sub

    @#Form overrides dispose to clean up the component list.

    Public Overrides Sub Dispose()

    MyBase.Dispose()

    components.Dispose()

    End Sub

    #Region " Windows Form Designer generated code "

    .......

    #End Region

    Protected Sub Form1_Click(ByVal sender As Object,

    ByVal e As System.EventArgs)

    Dim a As New Fee(100)

    Dim b As New Fee(80)

    a.disp()

    b.disp()

    End Sub

    End Class

    此程序输出如下﹕Amount is 100

    Amount is 80

    a 和 b是Fee类别之对象。当计算机执行指令──

    a.disp()

    我对这篇文章有话说?
  • 广告位招租,广告代号:content_468_15
  • 上一篇:VB.Net基本语句(推荐)
    下一篇:Visual Basic .NET 代码示例 (From MS)