Prev | Current Page 80 | Next

Guy Fouch?©, Trey Nash

"Accelerated VB 2008"

The default access of the
class members, in the absence of any modifiers at all, is Public. Classes can only have one of
two access modifiers. Classes can either be Public or Friend. By default, they are Friend.
You can apply only Public, Private, and Friend to Structure member definitions. We
cover Structure definitions in greater detail later in the chapter in the section titled ???Value
CHAPTER 3 n CLASSES AND STRUCTURES 37
Type Definitions.??? Notice the absence of Protected and Protected Friend. This is due to the
fact that structures are implicitly sealed, meaning they cannot be base classes. We cover the
NotInheritable modifier in more detail in the section titled ???NotInheritable Classes.???
Interfaces are implicitly Public, as they define a set of operations, or contract, that a class
can implement. It makes no sense for an interface to have any restricted access members,
since restricted access members are normally associated with a class implementation, and
interfaces, by their definition, contain no implementation. The same applies to enumerations
(Enum), as they are normally used as a named collection of constants and have no internal
implementation. Finally, a Namespace is also implicitly Public, and cannot have any access
modifiers applied to it.


Pages:
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
Peg Perego Vela Easy Drive pit 37 druk opony goodyear wynajem sal szkoleniowych warszawa Okna PCV Wrocław