Here is the code fragement I use:
public static bool IsFullyTrusted()
{
try
{
(new PermissionSet(PermissionState.Unrestricted)).Demand();
}
catch (SecurityException)
{
return false;
}
return true;
}This seems to do the trick, albeit this has only ever been tested with Low, Medium and High trust levels. I've never tried with the 'Everything' named permission set - which I expect would report false. Cheers Mark Levison
