PermissionSet.ContainsNonCodeAccessPermissions Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene un valor que indica si PermissionSet contiene permisos que no se derivan de CodeAccessPermission.
public:
bool ContainsNonCodeAccessPermissions();
public bool ContainsNonCodeAccessPermissions ();
member this.ContainsNonCodeAccessPermissions : unit -> bool
Public Function ContainsNonCodeAccessPermissions () As Boolean
Devoluciones
true
si PermissionSet contiene permisos que no se derivan de CodeAccessPermission; en caso contrario, false
.
Ejemplos
En el ejemplo de código siguiente se muestra el uso del ContainsNonCodeAccessPermissions método . Este ejemplo de código es parte de un ejemplo mayor proporcionado para la clase 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())