BerConverter.Decode(String, Byte[]) 方法

定义

Decode(String, Byte[]) 方法使用 BER 对数据的二进制表示形式进行解码,以检索结构化数据。The Decode(String, Byte[]) method decodes a binary representation of the data, using BER, to retrieve structured data.

public:
 static cli::array <System::Object ^> ^ Decode(System::String ^ format, cli::array <System::Byte> ^ value);
public static object[] Decode (string format, byte[] value);
static member Decode : string * byte[] -> obj[]
Public Shared Function Decode (format As String, value As Byte()) As Object()

参数

format
String

格式字符串。The format string.

value
Byte[]

BER 数据组成的数组。An array of BER data.

返回

Object[]

已解码的数据。The decoded data.

例外

format 参数包含 null 引用(在 Visual Basic 中为 Nothing)。The format parameter contains a null reference (Nothing in Visual Basic).

format 参数包含未定义的字符。The format parameter contains an undefined character.

基础解码失败。The underlying decoding fails. 解码规则包括以下内容。The decoding rules include the following.

代码Code 对应的结果Corresponding Result
'{' '}' '[' ']' 'n' 'x''{' '}' '[' ']' 'n' 'x' 无对应的结果No corresponding result
'i' 'e''i' 'e' intint
'b''b' boolbool
“a”'a' 字符串string
'O''O' byte[]byte[]
'B''B' 包含位字符串的 byte[]byte[] containing bit strings
'v''v' string[]string[]
'V''V' byte[][]byte[][]

适用于