FileIOPermission.IsSubsetOf(IPermission) FileIOPermission.IsSubsetOf(IPermission) FileIOPermission.IsSubsetOf(IPermission) FileIOPermission.IsSubsetOf(IPermission) Method

定義

判斷目前權限是否為指定權限的子集。Determines whether the current permission is a subset of the specified permission.

public:
 override bool IsSubsetOf(System::Security::IPermission ^ target);
public override bool IsSubsetOf (System.Security.IPermission target);
override this.IsSubsetOf : System.Security.IPermission -> bool
Public Overrides Function IsSubsetOf (target As IPermission) As Boolean

參數

target
IPermission IPermission IPermission IPermission

要測試子集關聯性的權限。A permission that is to be tested for the subset relationship. 這個權限必須與目前權限屬於相同的類型。This permission must be the same type as the current permission.

傳回

如果目前權限是指定權限的子集,則為 true,否則為 falsetrue if the current permission is a subset of the specified permission; otherwise, false.

例外狀況

target 參數不是 null,而且與目前權限屬於不同的類型。The target parameter is not null and is not of the same type as the current permission.

備註

目前的使用權限是指定的權限的子集,如果目前的使用權限會指定一組作業所包含的指定權限。The current permission is a subset of the specified permission if the current permission specifies a set of operations that is contained by the specified permission. 比方說,代表以 C:\example.txt 的讀取權限的權限是到 c: 代表讀取權限的權限的子集\。For example, a permission that represents read access to C:\example.txt is a subset of a permission that represents read access to C:\. 如果此方法傳回true,目前的權限,表示沒有存取受保護的資源比指定的權限。If this method returns true, the current permission represents no more access to the protected resource than does the specified permission.

適用於