Toggle navigation
Log in
Sign Up
Log in
Sign Up
Appium
C
C#
C++
Docker
Go
Informatica
Java
JavaScript
Kafka
Numpy
Oracle
Pandas
PHP
Py Spark
Python
R
React Native
Scipy
SFTP
Tableau
Teradata
TGMC
UNIX
Introducing
Radical.sh
Forget Code launches a powerful code generator for building API's
Forget_Code.Models.CategoryViewModel
Add a new snippet
Access Specifier
6
ADO .Net
3
Basics
16
Collections
1
Console
1
Date Functions
15
Delegates
1
File
7
Keywords
2
LINQ
1
Loops
1
Math Snippets
5
Memory Management
1
Operators
3
Reflection
2
Regular Expressions
3
String Functions
18
String Snippets
8
Threading
1
Type Casting
5
Choose Category
Visibility in C#
Forget Code
C#
Visibility
The visibility of a class, a method, a variable or a property tells us how this item can be accessed.
Public:
The member can be reached from anywhere.
This is the least restrictive visibility.
Enums and interfaces are, by default, publicly visible.
Protected:
Members can only be reached from within the same class, or from a class which inherits from this class.
Internal:
Members can be reached from within the same project only.
Protected Internal:
The same as internal, except that also classes which inherits from this class can reach it members, even from another project.
Private:
They can only be reached by members from the same class.
This is the most restrictive visibility.
Classes and structs are by default set to private visibility.
..
Tags for Visibility in C#
DP_Access Specifier
c
protected visibility c sharp
internal visibility c sharp
csharp visibility
c sharp visibility
Contribute to Forget Code, help others.
Add snippet