AsnWriter.WriteEnumeratedValue 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
| 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>)
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.
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>)
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.
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].