共用方式為


CertificateRequestProperties.Subject 屬性

定義

取得或設定主體名稱。

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

屬性值

String

Platform::String

winrt::hstring

X.500 辨別名稱 (DN) 。

範例

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

備註

此值是 (DN) 的 X.500 辨別名稱。 這可以是包含一或多個相對辨別名稱的完整 DN 字串, (RDN) 格式為 「CN=;OU=,..」,或者主體名稱可以是包含完整 DN) 元件之一般名稱的簡單字串 (CN) 元件。

適用於