What are the access-specifiers available in c#?

Answer Posted / faiyazul islam

public - allow to access member functions and member
variable of a class from other class that can be inside or
outside of namespace collection.

private - only allow to access member functions and member
variable of a class within the same class.

protected- allow to access member functions and member
variable of a class from within same class and child classes
that can be inside or outside the namespace collection.

internal - allow to access member functions and member
variable of a class from within same class and class within
the inside namespace collection.

internal protected - allow to access member functions and
member variable of a class from within same class and and
child class within the inside namespace.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is clr a compiler?

693


Is and as keyword in c# net?

781


How to handle exceptions that are raised in a component?

848


What is a bool in c#?

674


How does c# generics and c++ templates compare?

693


What is inheritance c#?

715


What is Covariance and contravariance in C#?

789


What is the difference between an integer and int?

717


What is the difference between “dispose” and “finalize” variables in c#?

742


Which string method is used for concatenation of two strings in c#?

737


What is exe in c#?

711


What is routing in c#?

673


What do u mean by thread safe?

737


What are console applications used for?

718


what is the difference between the debug class and trace class?

757