分配结构的变化,我有以下通过财产
Public Structure Foo
dim i as integer
End Structure
Public Class Bar
Public Property MyFoo as Foo
Get
return Foo
End Get
Set(ByVal value as Foo)
foo = value
End Set
dim foo as Foo
End Class
Public Class Other
Public Sub SomeFunc()
dim B as New Bar()
B.MyFoo = new Foo()
B.MyFoo.i = 14 'Expression is a value and therefore cannot be the target of an assignment ???
End Sub
End Class
我的问题是,为什么我不能过我的财产在酒吧类分配给我?我做错了什么?
很奇怪,不是行为我期待 – Jodrell 2011-06-01 11:40:36
同样的事情更直接的方式'我'的保护/访问级别是相关的,但我同意不是问题 – Jodrell 2011-06-01 12:07:29