![]() The namespace is irrelevant here, it is the derivation that matters.Ģ) internal means that the member is only available to a class in any namespace in the same Assembly: in practice it means "anywhere in this EXE or DLL file" since an Assembly can contain multiple namespaces.ģ) protected internal combines protected and internal to classes which derive from the original class, or are inside the current assembly. Even then, you can only access the member from within the original or derived class, it doesn't become public in the derived class. So you can think of it as " public for the class and derived classes, but private for all others.Ģ) internal extends protected to any class in any namespace in the same Assembly: in practice it means "anywhere in this EXE or DLL file" since an Assembly can contain multiple namespaces.ģ) protected internal extends internal to classes which derive from the original class, even if they are outside the current namespace and assembly.ġ) You can't unless you derive a class from the original class which declare the protected member. 1) protected means that the code can be accessed from any class derived from the original class. In Kotlin, the internal modifier is a newly added modifier that is not supported by Java.
0 Comments
Leave a Reply. |