How can you tell if you’re running in FullTrust (WPF)?

I’ve been binging all for naught, I need a simple boolean true / false so I can do or not do something that requires full trust (private reflection for diagnostics). Will this do it?

var perm = new ReflectionPermission(PermissionState.Unrestricted);
if (!perm.IsUnrestricted())
    yield break;

Does anyone know the secret recipe?

Author: justinmchase

I'm a Software Developer from Minnesota.

Drop a brain bomb

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.