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
What is the difference between hashtable and dictionary in c#?
Is c sharp and c# are same?
What is data types in c#?
Is a dll an assembly?
How to add controls dynamically to the form using c#.net.
What is the difference between hashtable and dictionary?
What is the difference between method parameters and method arguments. Give an example?
What is string empty?
What are value types in c#?
what is IDisposal interface,IComparable,IEquatable,IFormatable
Are private members inherited in c#?
What is an escape sequence in c#?
Can we have multiple constructors in a class c#?
What is uint64_t?
What is difference between .net and c#?