在Javascript中的每個對象攜帶this
,其指的是本身。如何創建類中的字段來引用包含它的對象?對象如何引用自身?
- 編 -
澄清,我的意思是,如果我宣佈:
Class xc
Private i As Integer
End Class
然後進行參考:
Dim x As New xc()
x.Me
我得到的錯誤:
'Me' is not a member of 'MyProject.xc'. - \x...\test.vb(3) - Source Line: x.Me
順便提一下,問題出現在以下,相關問題:How to refer to an object created by "with" within the construct?
這不就是「我」是指形成的? – matzone
@matzone表格是一個類 – Steve
如果代碼位於表單上,是的。 :-) –