Joseph's programming tidbit #1 - scope in .NET
No, I'm not talking about mouthwash.
There are five scopes in Visual Basic.NET
Another sly nuance exception to scope arrises from nested classes. Private class level variables of a class that is nested within another can be accessed by the parent class. Ah ha! There not so private after all! Kinda like the neighbor who has a view into your living room from theirs. Like my neighbor for example.
Singelton class: A class designed such that only one instance of that class exists at any one time. I typically accomplish this in my code with a DefInstance static method which hold the one instance of the class that I want the rest of the project to access.
-Joseph
There are five scopes in Visual Basic.NET
- Private
- Friend
- Protected
- Public
- Protected Friend
Another sly nuance exception to scope arrises from nested classes. Private class level variables of a class that is nested within another can be accessed by the parent class. Ah ha! There not so private after all! Kinda like the neighbor who has a view into your living room from theirs. Like my neighbor for example.
Singelton class: A class designed such that only one instance of that class exists at any one time. I typically accomplish this in my code with a DefInstance static method which hold the one instance of the class that I want the rest of the project to access.
-Joseph
Comments