次の方法で共有


PermissionSet.ContainsNonCodeAccessPermissions メソッド

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

Public Function ContainsNonCodeAccessPermissions() As Boolean
[C#]
public bool ContainsNonCodeAccessPermissions();
[C++]
public: bool ContainsNonCodeAccessPermissions();
[JScript]
public function ContainsNonCodeAccessPermissions() : Boolean;

戻り値

PermissionSet が、 CodeAccessPermission から派生していないアクセス許可を格納している場合は true 。それ以外の場合は false

使用例

 
' 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())

[C#] 
// 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());

[C++] 
// 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(S"ContainsNonCodeAccessPermissions method returned {0}",
   __box(ps1->ContainsNonCodeAccessPermissions()));

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

PermissionSet クラス | PermissionSet メンバ | System.Security 名前空間