Update access-modifiers.md

This commit is contained in:
Stone_Red
2024-03-07 15:54:59 -05:00
committed by Jean-Philippe Sirois
parent 1b76e2ef3b
commit 016b8b7d38
@@ -1,11 +1,13 @@
---
authors:
- "Stone_Red#0001"
created_at: 2021/08/07
created_at: 2023/09/16
title: Access Modifiers
external_resources:
- text: Access Modifiers
href: "https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers"
href: "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/access-modifiers"
- text: Accessibility Levels
href: "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/accessibility-levels"
---
## Availible access modifiers
@@ -16,6 +18,7 @@ external_resources:
- **internal:** The type or member can be accessed by any code in the same assembly, but not from another assembly.
- **protected internal:** The type or member can be accessed by any code in the assembly in which it's declared, or from within a derived class in another assembly.
- **private protected:** The type or member can be accessed only within its declaring assembly, by code in the same class or in a type that is derived from that class.
- **file** The declared type is only visible in the current source file. File scoped types are generally used for source generators.
## Why not use _public_ for everything?