New Features in C# 2.0—Limit Access: What about

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:Tutorials
C# Tutorials

New Features in C# 2.0

© 2005 O'Reilly Media, Inc.

What about…

…restrictions on using access modifiers?

You cannot use these modifiers on interfaces or explicit interface member implementations. You can use them only if both get and set are included, and you can use them only on one or the other. Further, the modifier must restrict access, not broaden it. Thus, you cannot make the property protected and then use a modifier to make get public.


Previous_Page_.gif Next_Page_.gif


Personal tools