Asn1Tag.TryEncode(Span<Byte>, Int32) 方法
定义
尝试将此标记的 BER 编码形式写入到 destination。Attempts to write the BER-encoded form of this tag to destination.
public:
bool TryEncode(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryEncode (Span<byte> destination, out int bytesWritten);
member this.TryEncode : Span<byte> * int -> bool
Public Function TryEncode (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
参数
- bytesWritten
- Int32
成功时将收到 CalculateEncodedSize() 的值,失败时为 0。Receives the value from CalculateEncodedSize() on success, 0 on failure.
返回
如果为以下值则为 false:destination.Lengthfalse if destination.Length < CalculateEncodedSize()(),否则为 true。< CalculateEncodedSize()(), true otherwise.