共用方式為


SecurityManager.IsGranted(IPermission) 方法

定義

警告

此 API 現已淘汰。

警告

IsGranted is obsolete and will be removed in a future release of the .NET Framework. Please use the PermissionSet property of either AppDomain or Assembly instead.

判斷是否授與呼叫端使用權限。

public:
 static bool IsGranted(System::Security::IPermission ^ perm);
[System.Obsolete]
public static bool IsGranted (System.Security.IPermission perm);
public static bool IsGranted (System.Security.IPermission perm);
[System.Obsolete("IsGranted is obsolete and will be removed in a future release of the .NET Framework.  Please use the PermissionSet property of either AppDomain or Assembly instead.")]
public static bool IsGranted (System.Security.IPermission perm);
[<System.Obsolete>]
static member IsGranted : System.Security.IPermission -> bool
static member IsGranted : System.Security.IPermission -> bool
[<System.Obsolete("IsGranted is obsolete and will be removed in a future release of the .NET Framework.  Please use the PermissionSet property of either AppDomain or Assembly instead.")>]
static member IsGranted : System.Security.IPermission -> bool
Public Shared Function IsGranted (perm As IPermission) As Boolean

參數

perm
IPermission

要測試呼叫端授與的使用權限。

傳回

如果授與呼叫端的使用權限包括 perm 使用權限,則為 true,否則為 false

屬性

備註

授與許可權是由原則所決定,與要求受限於覆寫的不同,例如判斷提示。 此外, IsGranted 只測試呼叫程式碼元件的授與,與堆疊上的其他呼叫端無關。

適用於