X500DistinguishedNameBuilder.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Add(Oid, String, Nullable<UniversalTagNumber>) |
Adds a |
| Add(String, String, Nullable<UniversalTagNumber>) |
Adds a |
Add(Oid, String, Nullable<UniversalTagNumber>)
Adds a Relative Distinguished Name attribute identified by an OID.
public void Add(System.Security.Cryptography.Oid oid, string value, System.Formats.Asn1.UniversalTagNumber? stringEncodingType = default);
member this.Add : System.Security.Cryptography.Oid * string * Nullable<System.Formats.Asn1.UniversalTagNumber> -> unit
Public Sub Add (oid As Oid, value As String, Optional stringEncodingType As Nullable(Of UniversalTagNumber) = Nothing)
Parameters
- oid
- Oid
The OID of the attribute.
- value
- String
The value of the attribute.
- stringEncodingType
- Nullable<UniversalTagNumber>
The encoding type to use when encoding the value in to the attribute.
Exceptions
oid or value is null.
oid does not contain a valid OID.
-or-
stringEncodingType is not a type for character strings.
-or-
value is not encodable as defined by stringEncodingType.
Applies to
Add(String, String, Nullable<UniversalTagNumber>)
Adds a Relative Distinguished Name attribute identified by an OID.
public void Add(string oidValue, string value, System.Formats.Asn1.UniversalTagNumber? stringEncodingType = default);
member this.Add : string * string * Nullable<System.Formats.Asn1.UniversalTagNumber> -> unit
Public Sub Add (oidValue As String, value As String, Optional stringEncodingType As Nullable(Of UniversalTagNumber) = Nothing)
Parameters
- oidValue
- String
The OID of the attribute.
- value
- String
The value of the attribute.
- stringEncodingType
- Nullable<UniversalTagNumber>
The encoding type to use when encoding the value in to the attribute.
Exceptions
oidValue or value is null.
oidValue is an empty string or not a valid OID.
-or-
stringEncodingType is not a type for character strings.
-or-
value is not encodable as defined by stringEncodingType.