mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-06 23:43:45 +02:00
Update access-modifiers.md
This commit is contained in:
committed by
Jean-Philippe Sirois
parent
1b76e2ef3b
commit
016b8b7d38
@@ -1,11 +1,13 @@
|
|||||||
---
|
---
|
||||||
authors:
|
authors:
|
||||||
- "Stone_Red#0001"
|
- "Stone_Red#0001"
|
||||||
created_at: 2021/08/07
|
created_at: 2023/09/16
|
||||||
title: Access Modifiers
|
title: Access Modifiers
|
||||||
external_resources:
|
external_resources:
|
||||||
- text: Access Modifiers
|
- 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
|
## 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.
|
- **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.
|
- **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.
|
- **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?
|
## Why not use _public_ for everything?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user