Share via


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

定義

Decode(String, Byte[]) 方法會使用 BER 對資料的二進位表示進行解碼,以擷取結構資料。

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

格式字串。

value
Byte[]

BER 資料的陣列。

傳回

Object[]

解碼的資料。

例外狀況

format 參數包含 null 參考 (在 Visual Basic 中為 Nothing)。

format 參數包含未定義的字元。

基礎解碼失敗。 解碼規則包含下列項目。

程式碼 對應結果
'{' '}' '[' ']' 'n' 'x' 沒有對應的結果
'i' 'e' int
'b' bool
'a' 字串
'O' byte[]
'B' byte[],包含位元字串
'v' string[]
'V' byte[][]

適用於