PermissionSet.ContainsNonCodeAccessPermissions メソッド

定義

PermissionSet が、CodeAccessPermission から派生していないアクセス許可を含むかどうかを示す値を取得します。

public:
 bool ContainsNonCodeAccessPermissions();
public bool ContainsNonCodeAccessPermissions ();
member this.ContainsNonCodeAccessPermissions : unit -> bool
Public Function ContainsNonCodeAccessPermissions () As Boolean

戻り値

Boolean

PermissionSetCodeAccessPermission から派生していないアクセス許可を含む場合は true。それ以外の場合は false

次のコード例は、メソッドの使用方法を ContainsNonCodeAccessPermissions 示しています。 このコード例は、PermissionSet クラスのために提供されている大規模な例の一部です。

// Display the result of a call to the ContainsNonCodeAccessPermissions method.
// Gets a value indicating whether the PermissionSet contains permissions
// that are not derived from CodeAccessPermission.
// Returns true if the PermissionSet contains permissions that are not
// derived from CodeAccessPermission; otherwise, false.
Console::WriteLine( "ContainsNonCodeAccessPermissions method returned {0}", ps1->ContainsNonCodeAccessPermissions() );
// Display the result of a call to the ContainsNonCodeAccessPermissions method.
// Gets a value indicating whether the PermissionSet contains permissions
// that are not derived from CodeAccessPermission.
// Returns true if the PermissionSet contains permissions that are not
// derived from CodeAccessPermission; otherwise, false.
Console.WriteLine("ContainsNonCodeAccessPermissions method returned " +
    ps1.ContainsNonCodeAccessPermissions());
' Display the result of a call to the ContainsNonCodeAccessPermissions method.
' Gets a value indicating whether the PermissionSet contains permissions 
' that are not derived from CodeAccessPermission.
' Returns true if the PermissionSet contains permissions that are not 
' derived from CodeAccessPermission; otherwise, false.
Console.WriteLine("ContainsNonCodeAccessPermissions method returned " & ps1.ContainsNonCodeAccessPermissions())

適用対象