0% found this document useful (0 votes)
23 views1 page

Intc#2

Enums, interfaces, and structs default to public access in C#. Classes default to internal access and can contain public, internal, private, or protected members. Methods, fields, and properties default to private access if no modifier is specified.

Uploaded by

ans
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Intc#2

Enums, interfaces, and structs default to public access in C#. Classes default to internal access and can contain public, internal, private, or protected members. Methods, fields, and properties default to private access if no modifier is specified.

Uploaded by

ans
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Default Access modifiers in C#?

An enum has default modifier as public A class has default modifiers as Internal . It can declare members (methods etc) with following access modifiers: public internal private protected internal An interface has default modifier as public A struct has default modifier as Internal and it can declare its members (methods etc) with following access modifiers: public internal private A methods, fields, and properties has default access modifier as "Private" if no modifier is specified.

You might also like