Public Access Modifier in C# with Example

Public Access Modifier in C# with Example
Rating: 5 - 1 Votes

Public Access Modifier in C# with Example

C#Public access modifier is one of the 5 access modifiers in C#.  Public access modifier is only used when you want to make any type member to be globally accessible within the containing type as well as outside of the containing type.  An example of Public access modifier in C# is given below.

 

 Output:

Robert Marks
Press any key to continue . . .