BerConverter.Encode(String, Object[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Encode(String, Object[]) method encodes structured data, using BER, to retrieve a binary representation of the data.
public:
static cli::array <System::Byte> ^ Encode(System::String ^ format, ... cli::array <System::Object ^> ^ value);
public static byte[] Encode (string format, params object[] value);
static member Encode : string * obj[] -> byte[]
Public Shared Function Encode (format As String, ParamArray value As Object()) As Byte()
Parameters
- format
- String
The format string.
- value
- Object[]
An array of formatted data.
Returns
Byte[]
An array of BER-encoded data.
Remarks
The following are valid format characters.
Encoding rules:
Code | Corresponding Argument |
---|---|
'{' '}' '[' ']' 'n' | No corresponding argument |
't' 'i' 'e' | int |
'a' | Octet string |
'b' | bool |
's' | string |
'o' 'X' | byte[] |
'v' | string[] |
'V' | byte[][] |
Note
'v' and 'V' are special in that a double {} is required. For example, use {{v}} and {{V}}.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | format is a null reference (Nothing in Visual Basic). |
ArgumentException | This exception occurs in any one of the following conditions: - There are not enough arguments for the format string. - The format string argument is incorrect. - The format string contains an undefined character. |
BerConversionException | Error processing return value. |
Applies to
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示