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 serialization in c#?

668


What is dbml file in c#?

770


How can it prevents DLL Hell assembly versioning in .NET?

768


What is the concept of strong names?

745


Are string objects mutable or immutable?

715


Can private virtual methods be overridden in c#.net?

713


Can we override interface method?

744


What do you understand by an Implicit Variable?

739


what is object-oriented programming (oop) language?

678


What is dynamic in c#?

662


Can you use foreach iteration on arrays in c#?

802


If you define a user defined data type by using the class keyword, is it a value type or reference type?

712


What is the difference between writeline and write in c#?

638


What is the difference between abstract and abstraction?

657


Explain the accessibility modifier protected internal?

655