/// <summary>
        ///   Reads the next value as a NamedBitList with tag UNIVERSAL 3, converting it to the
        ///   [<see cref="FlagsAttribute"/>] enum specfied by <paramref name="tFlagsEnum"/>.
        /// </summary>
        /// <param name="expectedTag">The tag to check for before reading.</param>
        /// <param name="tFlagsEnum">Type object representing the destination type.</param>
        /// <returns>
        ///   the NamedBitList value converted to a <paramref name="tFlagsEnum"/>.
        /// </returns>
        /// <exception cref="CryptographicException">
        ///   the next value does not have the correct tag --OR--
        ///   the length encoding is not valid under the current encoding rules --OR--
        ///   the contents are not valid under the current encoding rules --OR---
        ///   the encoded value is too big to fit in a <paramref name="tFlagsEnum"/> value
        /// </exception>
        /// <exception cref="ArgumentException">
        ///   <paramref name="tFlagsEnum"/> is not an enum type --OR--
        ///   <paramref name="tFlagsEnum"/> was not declared with <see cref="FlagsAttribute"/>
        ///   --OR--
        ///   <paramref name="expectedTag"/>.<see cref="Asn1Tag.TagClass"/> is
        ///   <see cref="TagClass.Universal"/>, but
        ///   <paramref name="expectedTag"/>.<see cref="Asn1Tag.TagValue"/> is not correct for
        ///   the method
        /// </exception>
        /// <seealso cref="ReadNamedBitListValue{TFlagsEnum}(Asn1Tag)"/>
        public Enum ReadNamedBitListValue(Asn1Tag expectedTag, Type tFlagsEnum)
        {
            AsnValueReader valueReader = OpenValueReader();
            Enum           ret         = valueReader.ReadNamedBitListValue(expectedTag, tFlagsEnum);

            valueReader.MatchSlice(ref _data);
            return(ret);
        }