Top "Access-modifiers" questions

Access modifier is an OOP concept.

How to make a property protected AND internal in C#?

Here is my shortened abstract class: abstract class Report { protected internal abstract string[] Headers { get; protected set; } } Here is a …

c# access-modifiers
How to change the access modifier of a user control

I have a user control created in xaml, lets name it "View". In the View.xaml.cs I changed the …

c# wpf xaml class-design access-modifiers
Why is Unity ignoring the initialized value of a non-static public field?

I'm using InvokeRepeating() to call a method in a game. I call InvokeRepeating() in the Start() method of one of …

c# serialization unity3d access-modifiers
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
Swift Public protocols with Internal functions and properties

I am wondering what the best practice is when I want some functions to be public and some to me …

ios swift swift3 access-modifiers swift-protocols
MVVM: Should a VM object expose an M object directly, or only through getters delegating to M's getters?

the best way to explain is with example so: this is the model public class Person { public int age; public …

c# design-patterns mvvm getter access-modifiers
c# abstract methods: internally public and virtual?

Are abstract methods internally public and virtual in c#? All methods are, by default, private and if an abstract method …

c# abstract-class private public access-modifiers
Detect access modifier type on a property using Reflection

I have written some code to look at properties using reflection. I have retrieved a list of properties from the …

c# reflection properties access-modifiers
How to access a protected method in C#

I would like to know how to access a protected method. I have a WebBrowser Control (Awesomium) which has many …

c# methods protected access-modifiers awesomium
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