In C# there are 5 different types of Access Modifiers.
|public||There are no restrictions on accessing public members.|
|private||Access is limited to within the class definition. This is the default access modifier type if none is formally specified|
|protected||Access is limited to within the class definition and any class that inherits from the class|
|internal||Access is limited exclusively to classes defined within the current project assembly|
|protected internal||Access is limited to the current assembly and types derived from the containing class. All members in current project and all members in derived class can access the variables.|
DEFAULT ACCESS MODIFIER
An enum has default modifier as public.
A class has default modifiers as Internal.
An interface has default modifier as public.
A struct has default modifier as Internal.
A methods, fields, and properties has default access modifier as “Private” if no modifier is specified.