X500DistinguishedNameBuilder.AddCountryOrRegion(String) Method

Definition

Adds a country or region attribute.

C#
public void AddCountryOrRegion(string twoLetterCode);

Parameters

twoLetterCode
String

The two letter code of the country or region.

Exceptions

twoLetterCode is null.

twoLetterCode is not exactly two characters, or contains characters that are not A through Z.

Remarks

This encodes an attribute with the OID 2.5.4.6 as a PrintableString.

twoLetterCode should be a two letter ISO 3166 alpha-2 code, and will be normalized to upper case characters.

Applies to

Product Versions
.NET 7, 8, 9, 10