📄 personlist.vb
字号:
Imports Microsoft.VisualBasic
Imports System.Collections
Public Class PersonList
Implements System.Collections.IEnumerable
Private innerList As ArrayList = New ArrayList()
Public Sub Add(ByVal aPerson As Person)
innerList.Add(aPerson)
End Sub
Public Sub Remove(ByVal aPerson As Person)
innerList.Remove(aPerson)
End Sub
Public ReadOnly Property Count() As Integer
Get
Return innerList.Count
End Get
End Property
'Get/set element at given index
Default Public Property Item(ByVal index As Integer) As Person
Get
Return CType(innerList(index), Person)
End Get
Set(ByVal Value As Person)
innerList(index) = Value
End Set
End Property
Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
Return innerList.GetEnumerator()
End Function
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -