CertificateRequestProperties.Subject CertificateRequestProperties.Subject CertificateRequestProperties.Subject CertificateRequestProperties.Subject CertificateRequestProperties.Subject Property

Definition

Gets or sets the subject name.

public : Platform::String Subject { get; set; }
winrt::hstring Subject();

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

Property Value

string string string

The X.500 distinguished name (DN).

Examples

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;
}

Remarks

This value is an X.500 distinguished name (DN). This can be a full DN string that contains one or more relative distinguished names (RDNs) in the format of "CN=;OU=,..", or the subject name can be a simple string that contains the common name (CN) component of the full DN.