PermissionSet.ContainsNonCodeAccessPermissions メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As PermissionSet Dim returnValue As Boolean returnValue = instance.ContainsNonCodeAccessPermissions
PermissionSet が、CodeAccessPermission から派生していないアクセス許可を格納している場合は 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 " & 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 {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 " + System.Convert.ToString( ps1.ContainsNonCodeAccessPermissions())));

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- PermissionSet.ContainsNonCodeAccessPermissions メソッドのページへのリンク