propertyf.vb
来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 34 行
VB
34 行
'Author:' Satya Sudha K (ksathyasudha@novell.com)'' (C) 2005 Novell, Inc.'' Properties taking arguments, overloading of propertiesImports SystemModule M Dim a As Integer() = {1, 2, 3} Property Prop(ByVal i As Integer, ByVal j As Integer) As Integer Get Return a(i) End Get Set(ByVal value As Integer) a(i) = Value End Set End Property Property Prop(ByVal i As Integer) As Integer Get Return a(i) End Get Set(ByVal value As Integer) a(i) = Value End Set End Property Function Main() As Integer Prop(2) = 10 If (Prop(2) <> 10) Then Throw New Exception("A#1 Properties not working with arguments. Expected 10 but got " & Prop(2)) End If End FunctionEnd Module
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?