AsnReader.ReadBoolean(Nullable<Asn1Tag>) 方法
定义
读取下一个值,作为带有指定标记的布尔值。Reads the next value as a Boolean with a specified tag.
public bool ReadBoolean (System.Formats.Asn1.Asn1Tag? expectedTag = default);
member this.ReadBoolean : Nullable<System.Formats.Asn1.Asn1Tag> -> bool
Public Function ReadBoolean (Optional expectedTag As Nullable(Of Asn1Tag) = Nothing) As Boolean
参数
读取前要检查的标记,或使用 null 作为默认标记(通用 1)。The tag to check for before reading, or null for the default tag (Universal 1).
返回
已解码的值。The decoded value.
例外
下一个值没有正确的标记。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.
expectedTag.TagClassexpectedTag.TagClass 为 Universal,但 expectedTag.TagValueis Universal, but expectedTag.TagValue 对于此方法而言是不正确的。is not correct for the method.