- protected internal
Understanding the public Access specifier in c#:
The public access specifier allows a class to expose its member variables and member function to other functions and objects. Any member that is declared public can be accessed from outside the class. The member can be accessed from anywhere.
The following is an example of the use of public access specifier.
public int iNum1;
static void Main(string args)
hello HelloObject = new hello();
HelloObject.iNum1 = 10; /* since variable iNum1 is public it can be accessed in other classes also*/
Output is display below.
C Sharp Access specifier Related Contents.
Understanding The private access specifier in c Sharp.
Understanding The protected access specifier in c Sharp.
Understanding The internal access specifier in c Sharp.
understanding the protected internal Access Specifier in c#:
if...else construct in c sharp.