What are the access-specifiers available in c#?

Answer Posted / archana

1. public - The member can be accessed from anywhere
2. internal - The member can only be accessed from type it
originates from or other types in the same assembly
3. protected - The member can only be accessed from the type
it originates from or from detrieved types of the
originating type
4. private - The member is only accessible by other members
within the type it originates from.

Is This Answer Correct ?    52 Yes 65 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sealed class in c#?

522


Why do we need ienumerable in c#?

466


Write a sample code to write the contents to text file in c#?

483


What is the purpose of namespace?

469


What is serialization and deserialization in c# with example?

458






What is hashtable in c# with example?

499


What is the advantage of static class in c#?

514


How assembly versioning in .NET prevent DLL Hell problem?

517


What is written in c#?

541


How to exclude a property from xml serialization?

543


What is null propagation c#?

508


Are classes passed by reference in c#?

484


What is the difference between const and readonly in c#.net?

505


How many keyword present in C# language ?

549


Why c# is called c sharp?

467