本帖最后由 876加几 于 2014-8-2 23:53 编辑
myownroc 发表于 2014-8-2 23:29
有这个闲功夫还不如练VB
我来练一句:
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…… |