CertificateRequestProperties.Subject Property

Definition

Gets or sets the subject name.

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

Property Value

String

Platform::String

winrt::hstring

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.

Applies to