Public Class Floor
Private a As String
Public Sub New(ByVal str As String)
a = str
End Sub
Public Property username As String
Get
Return a
End Get
Set(ByVal value As String)
a = value
End Set
End Property
End Class
Public Class Demo
Sub Main()
Dim LastFloor As Floor = New Floor("myownroc")
MsgBox(LastFloor.username) '=>myownroc
End Sub
'This is VB.NET
End Class
Public Class Floor
Private a As String
Public Sub New(ByVal str As String)
a = str
End Sub
Public Property username As String
Get
Return a
End Get
Set(ByVal value As String)
a = value
End Set
End Property
End Class
Public Class Demo
Sub Main()
Dim LastFloor As Floor = New Floor("myownroc")
MsgBox(LastFloor.username) '=>myownroc
End Sub
'This is VB.NET
End Class
貌似跑题了,但这是回复LS……