Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 2.3 KB

File metadata and controls

51 lines (38 loc) · 2.3 KB
title Access Modifiers (C# Reference)
ms.date 07/20/2015
ms.prod .net
ms.technology
devlang-csharp
ms.topic article
helpviewer_keywords
access modifiers [C#]
ms.assetid 61c3fa51-c00f-48cb-9b49-c805dedd62d7
caps.latest.revision 15
author BillWagner
ms.author wiwagn

Access Modifiers (C# Reference)

Access modifiers are keywords used to specify the declared accessibility of a member or a type. This section introduces the four access modifiers:

  • public
  • protected
  • internal
  • private

The following six accessibility levels can be specified using the access modifiers:

  • public: Access is not restricted.

  • 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.

This section also introduces the following:

See Also

C# Reference
C# Programming Guide
C# Keywords
Access Modifiers
Access Keywords
Modifiers