Skip to content
AgileLogics
3 min read

Access Modifiers

Prerequisites: Properties

Like Java: public (visible everywhere), private (visible only inside the same class), protected (visible to subclasses), plus internal (visible anywhere in the same project/assembly, with no direct Java equivalent).

public class Account {
    private double _balance;      // this class only
    protected string Owner = "";   // this class + subclasses
    internal string Notes = "";    // anywhere in this project
}