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>
이 메서드가 true
를 반환하면 이 스트림을 만드는 데 사용된 바이트 배열 세그먼트, 이 메서드가 false
를 반환하면 이 매개 변수는 default
로 설정됩니다.When this method returns true
, the byte array segment from which this stream was created; when this method returns false
, this parameter is set to default
.
반환
버퍼가 노출 가능한 경우 true
이고, 그렇지 않은 경우 false
입니다.true
if the buffer is exposable; otherwise, false
.
설명
이 메서드는 true
내부 버퍼가 exposable로 표시 된 경우를 반환 합니다 .이 경우에는 현재 인스턴스가로 생성 될 때 발생 합니다 MemoryStream
.This method returns true
when the the underlying buffer is marked as exposable, which happens when the current MemoryStream
instance is created with:
- MemoryStream().MemoryStream().
- MemoryStream(Int32).MemoryStream(Int32).
- MemoryStream(Byte[], Int32, Int32, Boolean, Boolean) 매개 변수가
publiclyVisible
로 설정 된true
입니다.MemoryStream(Byte[], Int32, Int32, Boolean, Boolean) with the parameterpubliclyVisible
set totrue
.
현재 인스턴스가를 사용 하 여 만들어진 경우에는 기본 버퍼가 노출 되지 않습니다 MemoryStream
.The underlying buffer will not be exposed if the current MemoryStream
instance is created with:
- MemoryStream(Byte[], Boolean)
- MemoryStream(Byte[], Int32, Int32, Boolean, Boolean) 매개 변수가
publiclyVisible
로 설정 된false
입니다.MemoryStream(Byte[], Int32, Int32, Boolean, Boolean) with the parameterpubliclyVisible
set tofalse
.