Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition
by Paul J. Deitel - Deitel & Associates, Inc., Harvey M. Deitel - Deitel & Associates, Inc.
10.8. Friend Members
Another intermediate level of member access is Friend access. A class’s Friend members can be accessed only by code in the same assembly. In a program or an assembly that consists of one class declaration, declaring a member with Friend access has no specific effect. However, if a program uses multiple classes from the same assembly, these classes can access each other’s Friend members directly through references to objects of the appropriate classes. Unlike Public access, any other programs that are declared outside the assembly cannot access these Friend members. To access a non-Shared Friend member within the same assembly, you would first have to create an object of the class that declares the Friend member, then invoke ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access