MemoryStream.TryGetBuffer(ArraySegment<Byte>) 方法

定義

傳回用於建立這個資料流之不帶正負號位元組的陣列。Returns the array of unsigned bytes from which this stream was created. 指出轉換是否成功的傳回值。The return value indicates whether the conversion succeeded.

public:
 virtual bool TryGetBuffer([Runtime::InteropServices::Out] ArraySegment<System::Byte> % buffer);
public virtual bool TryGetBuffer (out ArraySegment<byte> buffer);
abstract member TryGetBuffer : ArraySegment -> bool
override this.TryGetBuffer : ArraySegment -> bool
Public Overridable Function TryGetBuffer (ByRef buffer As ArraySegment(Of Byte)) As Boolean

參數

buffer
ArraySegment<Byte>

從其中建立此資料流的位元組陣列區段。The byte array segment from which this stream was created.

傳回

如果轉換成功,則為 true;否則為 falsetrue if the conversion was successful; otherwise, false.

適用於