Condividi tramite


CertificateRequestProperties.Subject Proprietà

Definizione

Ottiene o imposta il nome del soggetto.

public:
 property Platform::String ^ Subject { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Subject();

void Subject(winrt::hstring value);
public string Subject { get; set; }
var string = certificateRequestProperties.subject;
certificateRequestProperties.subject = string;
Public Property Subject As String

Valore della proprietà

String

Platform::String

winrt::hstring

Nome distinto X.500 (DN).

Esempio

public String GetSetSubjectName(String strNameIn)
{
    // Create a new CertificateRequestProperties object.
    CertificateRequestProperties reqProperties = new CertificateRequestProperties();

    // The default value is an empty string.
    String strDefaultName = reqProperties.Subject;

    // If the input option does not equal the default option, reset the property value.
    if (strNameIn != strDefaultName)
    {
        reqProperties.Subject = strNameIn;
    }

    // Return the subject name.
    return reqProperties.Subject;
}

Commenti

Questo valore è un nome distinto X.500 (DN). Può trattarsi di una stringa DN completa che contiene uno o più nomi distinti relativi (RDN) nel formato "CN=;OU=,.." oppure il nome del soggetto può essere una stringa semplice che contiene il componente nome comune (CN) del DN completo.

Si applica a