adspace


Can you use all access modifiers for all types?

Answer Posted / Om Pal Singh

No, not all access modifiers can be used for all types. For example, private and protected access modifiers cannot be used with fields, events, or properties of an interface. Additionally, private and internal are the only legal access modifiers for constructors.

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

998


Which namespaces are necessary to create a localized application?

1142


How do you inherit a class into other class in c#?

994


Why can't we use a static class instead of singleton?

954


What is an abstract class c#?

969


How to assign Null value to Var?

1063