A newbie vb.net question
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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
Publicand you nee to qualify the name explicitly asOuterClassName.InnerStructureNamewhen 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.