CertificateRequestProperties.FriendlyName 属性

定义

获取或设置已注册证书的显示名称。

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

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

属性值

String

Platform::String

winrt::hstring

显示名称。

示例

public String GetSetDisplayName(String strDisplayNameIn)
{
    // Create a new CertificateRequestProperties object.
    CertificateRequestProperties reqProperties = new CertificateRequestProperties();
    
    // The default value is an empty string.
    String defaultName = reqProperties.FriendlyName;

    // If the input option does not equal the default option, reset the property value.
    if (strDisplayNameIn != defaultName)
    {
        reqProperties.FriendlyName = strDisplayNameIn;
    }

    // Return the display name.
    return reqProperties.FriendlyName;

}

注解

默认情况下,此值为空字符串。 FriendlyName

适用于