Web Design that taps into the haromny and vision of your dreams.

C# Access Modifier List

C# Access Modifier cheat sheet

Written By on in C#

112 words, estimated reading time 1 minutes.

This is a quick reminder sheet for the different access modifiers, their descriptions and scope. An access modifier defines which objects, properties and methods can "see" a particular object, property or method.

Access ModifierDescription
publicA public member is accessible from anywhere. This is the least restrictive access modifier.
protectedA protected member is accessible from within the class and all derived classes. No access from the outside is permitted.
privateA private member is accessible only from within the same class. Not even derived classes can access it.
internalAn internal member is accessible from within any part of the same Microsoft .NET-based assembly. You can think of it as public at the assembly level and private from outside the assembly.
protected internalinternal protected member is accessible from within the current assembly or from within types derived from the containing class.

Last updated on: Friday 8th September 2017



There are no comments for this post. Be the first!


Leave a Reply

Your email address will not be published.

If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Copyright © 2001-2018 Tim Trott, all rights reserved. Web Design by Azulia Designs

This web page is licensed for your personal, private, non-commercial use only.

Disclaimer, Privacy & LegalSitemapContact Me