contactmatt
contactmatt

Reputation: 18600

Can you use reflection even if the ReflectionPermission is turned off?

According to Godaddy,

Applications operating under a Medium trust level have no registry access, no access to the Windows event log, and cannot use ReflectionPermission (but can use Reflection).

What can I do, and can I not do with ReflectionPermission turned off?

(I'm using .NET 4)

Upvotes: 2

Views: 193

Answers (1)

Nicole Calinoiu
Nicole Calinoiu

Reputation: 20992

Your code does not need ReflectionPermission to use reflection to discover or invoke types or members that it could have accessed without using reflection. For example, you can invoke a public method of a public class via reflection even if you do not have ReflectionPermission.

Upvotes: 3

Related Questions