O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visibility Aspects

Assemblies are not just the typically used unit of deployment for .NET code, they also have a runtime impact with regard to protection. The internal visibility modifier embodies precisely this in the C# language, restricting access to types or members to the current assembly only.

Note: Reflection as an Escape Valve?

Visibility is enforced by the runtime, as discussed later, such that it isn’t possible for code to invoke methods or access members that it doesn’t have access to. However, using reflection services, it’s possible to bypass visibility checks. To prevent this from happening, other security measures have to be put in place with regard to partial trust applications. Refer to MSDN for more about these code security ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required