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

📄 defaultpropd.vb

📁 大名鼎鼎的mono是.NET平台的跨平台(支持linux
💻 VB
字号:
'Author:'   V. Sudharsan (vsudharsan@novell.com)'' (C) 2005 Novell, Inc.Imports SystemClass base    Default Public ReadOnly Property Item(ByVal i As Integer) As Integer        Get            Return i        End Get    End Property    Default Public ReadOnly Property Item(ByVal i As Integer, ByVal j As Integer) As Integer        Get            Return i + j        End Get    End PropertyEnd ClassClass derive    Inherits base    Default Public Overloads ReadOnly Property Item(ByVal i As Integer) As Integer        Get            Return 2 * i        End Get    End PropertyEnd ClassModule DefaultA    Function Main() As Integer        Dim a As derive = New derive()        Dim i, j As Integer        i = a(10)        j = a(10, 20)        If i <> 20 Then            System.Console.WriteLine("Default Not Working") : Return 1        End If        If j <> 30 Then            System.Console.WriteLine("Default Not Working") : Return 1        End If    End FunctionEnd Module

⌨️ 快捷键说明

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