C# Access Modifiers
'Modifier' | 'Description'
public The code is accessible for all classes
private The code is only accessible within the same class
protected The code is accessible within the same class,
or in a class that is inherited from that class.
internal The code is only accessible within its own assembly,
but not from another assembly.
0
0
'Combination Modifier'| 'Description'
protected internal member is accessible to all class that extends
the given class and all other classes in the same
assembly
private protected accessible by types derived from the conataining
class, but only within its countaining assembly
Thank you!
0
0
3.75
4
By default, all members of a class are private if you don't specify an
access modifier.
Thank you!
4
0
4.22
9
public : Accès non restreint.
protected : Access is limited to the containing class or types derived from the containing class.
internal : Access is limited to the current assembly.
protected internal : Access is limited to the current assembly or types derived from the containing class.
private : Access is limited to the containing type.
private protected : Access is limited to the containing class or types derived from the containing class within the current assembly.
Thank you!
9
0
Are there any code examples left?
New code examples in category C#
-
C# 2022-03-27 22:40:23 c# movement script
-
C# 2022-03-27 22:15:17 Delete last modification on EntityFramework Core
-
C# 2022-03-27 22:15:02 file.create folder c#
-
C# 2022-03-27 19:25:04 Error inflating class android.support.constraint.ConstraintLayout
-
C# 2022-03-27 19:15:02 top down shooting in unity 2D
-
C# 2022-03-27 18:50:02 c# remove invalid directory characters
-
C# 2022-03-27 18:30:07 how to use K2 games Games parallax background
-
C# 2022-03-27 18:25:10 c# replace crlf
-
C# 2022-03-27 18:25:09 keycode for left mouse click unity