다음을 통해 공유


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

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- value is not a boxed enum value. -or- the unboxed type of value is declared [FlagsAttribute].

Applies to

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

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, 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- TEnum is not an enum. -or- TEnum is declared [FlagsAttribute].

Applies to