Share via


AsnWriter.WriteEnumeratedValue Method

Definition

Overloads

WriteEnumeratedValue(Enum, Nullable<Asn1Tag>)

Write a non-[FlagsAttribute] enum value as an Enumerated with tag UNIVERSAL 10.

WriteEnumeratedValue<TEnum>(TEnum, Nullable<Asn1Tag>)

Write a non-[FlagsAttribute] enum value as an Enumerated with tag UNIVERSAL 10.

WriteEnumeratedValue(Enum, Nullable<Asn1Tag>)

Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs

Write a non-[FlagsAttribute] enum value as an Enumerated with tag UNIVERSAL 10.

public void WriteEnumeratedValue (Enum value, System.Formats.Asn1.Asn1Tag? tag = default);
member this.WriteEnumeratedValue : Enum * Nullable<System.Formats.Asn1.Asn1Tag> -> unit
Public Sub WriteEnumeratedValue (value As Enum, Optional tag As Nullable(Of Asn1Tag) = Nothing)

Parameters

value
Enum

The boxed enumeration value to write.

tag
Nullable<Asn1Tag>

The tag to write, or null for the default tag (Universal 10).

Exceptions

value is null.

tag.TagClass is Universal, but tag.TagValue is not correct for the method.

 -or-

 <code data-dev-comment-type="paramref">value</code> is not a boxed enum value.

 -or-

 the unboxed type of <code data-dev-comment-type="paramref">value</code> is declared [<xref data-throw-if-not-resolved="true" uid="System.FlagsAttribute"></xref>].

See also

Applies to

WriteEnumeratedValue<TEnum>(TEnum, Nullable<Asn1Tag>)

Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs
Source:
AsnWriter.Enumerated.cs

Write a non-[FlagsAttribute] enum value as an Enumerated with tag UNIVERSAL 10.

public void WriteEnumeratedValue<TEnum> (TEnum value, System.Formats.Asn1.Asn1Tag? tag = default) where TEnum : Enum;
member this.WriteEnumeratedValue : 'Enum * Nullable<System.Formats.Asn1.Asn1Tag> -> unit (requires 'Enum :> Enum)
Public Sub WriteEnumeratedValue(Of TEnum As Enum) (value As TEnum, Optional tag As Nullable(Of Asn1Tag) = Nothing)

Type Parameters

TEnum

The non-[FlagsAttribute] enumeration type to write.

Parameters

value
TEnum

The boxed enumeration value to write.

tag
Nullable<Asn1Tag>

The tag to write.

Exceptions

value is null.

tag.TagClass is Universal, but tag.TagValue is not correct for the method.

 -or-

 <code data-dev-comment-type="typeparamref">TEnum</code> is not an enum.

 -or-

 <code data-dev-comment-type="typeparamref">TEnum</code> is declared [<xref data-throw-if-not-resolved="true" uid="System.FlagsAttribute"></xref>].

See also

Applies to