public void Demand() { } [Obsolete("Deny is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
internal static bool IsPermissionGranted(CodeAccessPermission requestedPermission) { try { // Try and get this permission requestedPermission.Demand(); return true; } catch { return false; } }