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

What is hierarchical inheritance in c#?

558


What is monitor in C#?

682


What is array c#?

607


What is the difference between namespace and class?

516


What is deferred execution in c#?

612






Can you inherit multiple abstract classes in c#?

610


What is meant by unicode characters?

649


How do we achieve encapsulation in c#?

572


Which is the best language for desktop application?

551


What is asynccallback c#?

614


How do I know if executenonquery is successful c#?

539


Explain the difference between boxing and unboxing.

632


What is method in c#?

556


How do you create dlls in .NET

662


What is mvc in c#?

552