[英]UserControl + ArrayList + vb.net
當我得到列表框的文本時,我會寫
ListBox1.Items(2).ToString()
允許我執行此操作的代碼是什么?
UserControl.positioniwant(2).title
UserControl.positioniwant(1).msg
它稱為“索引屬性”:
Public Class Foo
Public Property Position(ByVal index As Integer) As String
Get
Return _position(index)
End Get
Set(ByVal Value As String)
_position(index) = Value
End Set
End Property
Private _position(9) As String
End Class
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.