Share via


CngKey.HasProperty(String, CngPropertyOptions) Metodo

Definizione

Verifica se la proprietà specificata esiste o meno nella chiave.

public:
 bool HasProperty(System::String ^ name, System::Security::Cryptography::CngPropertyOptions options);
public bool HasProperty (string name, System.Security.Cryptography.CngPropertyOptions options);
[System.Security.SecurityCritical]
public bool HasProperty (string name, System.Security.Cryptography.CngPropertyOptions options);
member this.HasProperty : string * System.Security.Cryptography.CngPropertyOptions -> bool
[<System.Security.SecurityCritical>]
member this.HasProperty : string * System.Security.Cryptography.CngPropertyOptions -> bool
Public Function HasProperty (name As String, options As CngPropertyOptions) As Boolean

Parametri

name
String

Nome della proprietà da controllare.

options
CngPropertyOptions

Combinazione bit per bit dei valori di enumerazione che specificano le opzioni per la proprietà denominata.

Restituisce

true se la proprietà specificata viene individuata; in caso contrario, false.

Attributi

Eccezioni

name è null.

Commenti

Il options parametro viene usato in modo specifico per indicare quanto segue:

  • Indipendentemente dal fatto che la proprietà sia predefinita o personalizzata.

  • Indica se la proprietà deve essere mantenuta con la chiave.

Queste opzioni devono corrispondere al valore impostato con la proprietà oppure la proprietà non verrà trovata.

Questo metodo funziona correttamente anche se la proprietà è impostata su false o zero.

Si applica a