Show / Hide Table of Contents

CredentialLabel Property

CredentialLabel

A short name or description of the Credential.

C#
public string CredentialLabel { get; set; }

Property Value

Type Description
string

Exceptions

Type Condition
ArgumentNullException

Thrown when the supplied string is null.

ArgumentOutOfRangeException

Thrown when the string's UTF-8 byte count does not meet the length parameters MinLabelByteCount and MaxLabelByteCount.

ArgumentException

Thrown when there is a character that cannot be encoded with UTF-8. The exact exception may be derived from ArgumentException.

Remarks

The string only contains characters that can be encoded with UTF-8, and its UTF-8 byte count is between MinLabelByteCount and MaxLabelByteCount. Non-printing characters are allowed, as long as they can be encoded with UTF-8. For example, null (UTF-8: 0x00) and Right-To-Left Mark U+200F (UTF-8: 0xE2 0x80 0x8F) would be acceptable.

The System.Text.UTF8Encoding class contains methods such as System.Text.UTF8Encoding.GetByteCount(string) which can be used to validate the string prior to attempting to set it here. It is recommended to use the constructor System.Text.UTF8Encoding.UTF8Encoding(bool, bool) so error detection is enabled for invalid characters.

In this article
Back to top Generated by DocFX