PermissionSet.ContainsNonCodeAccessPermissions Metoda

Definicja

Pobiera wartość wskazującą, czy PermissionSet zawiera uprawnienia, które nie pochodzą z CodeAccessPermissionelementu .

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

Zwraca

Boolean

truejeśli zawiera PermissionSet uprawnienia, które nie pochodzą z CodeAccessPermission; w przeciwnym razie . false

Przykłady

Poniższy przykład kodu przedstawia użycie ContainsNonCodeAccessPermissions metody . Ten przykład kodu jest częścią większego przykładu podanego PermissionSet dla klasy.

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

Dotyczy