What are the access-specifiers available in c#?
Answer Posted / vakil vijay vamangari
Public: With respect to the assembly the variable,methods of
public class can be access any where .
Private: This is default in c#.net.With respect to the
assembly the variable,methods of private class can be
access only with in that class only.
Protected: With respect to the assembly the variable,methods
of protected class can be access with in that class(base
class) and accessed in class which is derived from that
base class.
Internal(friend in vb.net): With respect to the assembly the
variable,methods of internal class can be access with in
that assembly not the outside of that assembly
Protected Internal: Protected + Internal
With with respect to the assembly the variable,methods
of this class can be access with in that assembly and
protected out side the assembly
| Is This Answer Correct ? | 4 Yes | 13 No |
Post New Answer View All Answers
Does a loop recorder have to be removed?
Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana
What is short in c#?
Can we inherit a class with private constructor in c#?
Explain the advantage of using system.text.stringbuilder over system.string?
How do I create a single-file assembly?
How does substring work in c#?
Why do we use class in c#?
What is the purpose of dictionary in c#?
What is string literal in c#?
What is dictionary and hashtable in c#?
Are value types sealed?
What is the difference between an implicit conversion and an explicit conversion?
What are the types of comments in c#?
What is a delegate how is it type safe?