We provide IT Services

Register Now Click On

Read More Tutorials Click On

Post Page Advertisement [Top]

what is access modifier in c# with example:-

Access modifiers is a keyword ,it is use to declare accessibility  a class and data member & member function and constructor .

How many types of  access modifier

There are 5 type of access modifier:-

5.Protected Internal.

Private:-Private access modifier used with in class.

Public:-Public access modifier can be accessible in a class and outside of class and we and use to before a class and before a method.

Internal:- Internal access modifier can be used to before a class. And Internal access modifier can be used to same project anywhere.
but We can't use out side of project.

Protected:- Protected members in a base class it is accessible in the drive class.

Protected Internal:- Protected Internal modifier can be accessible from any class with in same assembly,and it is inclused   the derived  class.

1 comment:

Post a Comment

| Designed by Rockprogrammer