假设我有这样的课程:
Public Class Car
Private _id As Integer
Public Sub New()
End Sub
Public Property ID As Integer
Get
Return _id
End Get
Set(ByVal value As Integer)
_id = value
End Set
End Property
End Class
我有一个按钮可以执行以下操作:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Stuff As New Car
'Other code..
End Sub
我按了10次按钮......
如何修改此类的特定实例(例如,当我第三次单击按钮时创建的实例)以修改其属性?