Top "Access-levels" questions

Access level modifiers determine whether other classes can use a particular field or invoke a particular method.

How to restrict access to nested class member to enclosing class?

Is it possible to specify that members of a nested class can be accessed by the enclosing class, but not …

c# nested-class access-levels
Are protected members/fields really that bad?

Now if you read the naming conventions in the MSDN for C# you will notice that it states that properties …

c# performance coding-style access-levels
C# compile error: “X is inaccessible due to its protection level”

when c# gives this compile error? 'Favorite.Favorites.FavoriteCollection' is inaccessible due to its protection level private void Form1_Load(…

c# compiler-errors access-levels
Common CMS roles and access levels

I am currently writing a CMS and remember someone (it might have been on here) criticise the existing CMS for …

php permissions content-management-system roles access-levels
Why do I get an "Access Level must be protected or weaker" after extending a protected class variable and marking it private?

abstract class AbstractController { protected $repository; } class GraphController extends AbstractController { private $repository; } I get this error: Fatal error: Access level to …

php inheritance access-levels
How can I add user/access levels to my current login script?

I'm currently learning PHP and MySQL and I have been working from a basic (albeit old) login script tutorial - …

php session login-script access-levels
Difference between fileprivate and private extension?

Swift 3.0 I know that fileprivate access level modifier limited using of function/property to source file where it was declared …

swift3 swift4 access-control access-modifiers access-levels
Why can't extensions with protocol conformances have a specific access level?

Assume we have the following example code: protocol MyProtocol { func someFunction() } public class MyClass { } public extension MyClass: MyProtocol { func someFunction() { …

swift protocols swift-extensions access-levels
What is the difference between private and fileprivate in Swift 4

In Swift 4, since now private is visible in extensions also in the same source code file, how is it different …

swift access-control access-modifiers swift4 access-levels