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 a Jagged Array in C#?

548


What is returned if you pass the value 12.34 to the parsefloat () function?

521


When was .net linq added?

513


Does c# support multiple class inheritance?

604


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

523






What is int32 maxvalue?

510


What is threading in c# with example?

452


Explain the difference between the debug class and trace class?

492


What is anonymous methods in c#?

552


How to create multi-dimensional array?

599


What is nameof c#?

483


What is the use of 'as' Keyword in C# ?

576


How do I create a multilanguage, single-file assembly?

496


What is exe file in c#?

484


What is call back method?

516