A newbie vb.net quest开发者_JS百科ion
What is the side effects of defining a structure inside a class (name it X), and create a property inside that class of the type X?
There are no side-effects.
The only effect is that the structure is within the scope of the class, that is, if you want to use the scope from outside the class it has to be declared as Public
and you nee to qualify the name explicitly as OuterClassName.InnerStructureName
when using it.
Notably (and unlike in Java), the structure is not related to any instance of the class it’s contained in. So it cannot just access its surrounding class’s instance members.
精彩评论