BerConverter.Decode(String, Byte[]) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
此 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 包含一個空參考(Nothing 在 Visual Basic 中)。
參數 format 包含一個未定義的字元。
底層解碼失敗了。 解碼規則包括以下幾項。
| Code | 對應結果 |
|---|---|
| '{' '}' '[' ']' 'n' 'x' | 沒有相應的結果 |
| 「我」 | int |
| 「B」 | 布爾 |
| 「a」 | string |
| 「喔」 | 位元組[] |
| 「B」 | 包含位元串的位元組[] |
| 「v」 | string[] |
| 「V」 | 位元組[][] |