Share via


AsnWriter.WriteNamedBitList Method

Definition

Overloads

WriteNamedBitList(BitArray, Nullable<Asn1Tag>)

Write a bit array value as a NamedBitList with a specified tag.

WriteNamedBitList(Enum, Nullable<Asn1Tag>)

Write a [FlagsAttribute] enum value as a NamedBitList with a specified tag.

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

Write a [FlagsAttribute] enum value as a NamedBitList with a specified tag.

WriteNamedBitList(BitArray, Nullable<Asn1Tag>)

Source:
AsnWriter.NamedBitList.cs
Source:
AsnWriter.NamedBitList.cs
Source:
AsnWriter.NamedBitList.cs

Write a bit array value as a NamedBitList with a specified tag.

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

Parameters

value
BitArray

The bits to write.

tag
Nullable<Asn1Tag>

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

Exceptions

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

value is null.

Remarks

The index of the bit array corresponds to the bit number in the encoded format, which is different than the value produced by CopyTo(Array, Int32) with a byte array. For example, the bit array { false, true, true } encodes as 0b0110_0000 with 5 unused bits.

Applies to

WriteNamedBitList(Enum, Nullable<Asn1Tag>)

Source:
AsnWriter.NamedBitList.cs
Source:
AsnWriter.NamedBitList.cs
Source:
AsnWriter.NamedBitList.cs

Write a [FlagsAttribute] enum value as a NamedBitList with a specified tag.

public void WriteNamedBitList (Enum value, System.Formats.Asn1.Asn1Tag? tag = default);
member this.WriteNamedBitList : Enum * Nullable<System.Formats.Asn1.Asn1Tag> -> unit
Public Sub WriteNamedBitList (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 3).

Exceptions

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 not declared [FlagsAttribute].

value is null.

Applies to

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

Source:
AsnWriter.NamedBitList.cs
Source:
AsnWriter.NamedBitList.cs
Source:
AsnWriter.NamedBitList.cs

Write a [FlagsAttribute] enum value as a NamedBitList with a specified tag.

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

Type Parameters

TEnum

The [FlagsAttribute] enumeration type to write.

Parameters

value
TEnum

The enumeration value to write.

tag
Nullable<Asn1Tag>

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

Exceptions

tag.TagClass is Universal, but tag.TagValue is not correct for the method. -or- TEnum is not an enum value. -or- TEnum is not declared [FlagsAttribute].

Applies to