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.

%d bloggers like this: