MemoryStream.WriteByte(Byte) 메서드

정의

현재 위치에서 현재 스트림에 바이트를 씁니다.

public:
 override void WriteByte(System::Byte value);
public override void WriteByte (byte value);
override this.WriteByte : byte -> unit
Public Overrides Sub WriteByte (value As Byte)

매개 변수

value
Byte

쓸 바이트입니다.

예외

스트림이 쓰기를 지원하지 않습니다. 자세한 내용은 CanWrite를 참조하십시오.

또는 현재 위치가 스트림의 끝에 있으며 용량을 수정할 수 없는 경우

현재 스트림이 닫혀 있습니다.

예제

이 코드 예제는에 대해 제공 된 큰 예제의 일부는 MemoryStream 클래스입니다.

// Write the second string to the stream, byte by byte.
count = 0;
while ( count < secondString->Length )
{
   memStream->WriteByte( secondString[ count++ ] );
}
// Write the second string to the stream, byte by byte.
count = 0;
while(count < secondString.Length)
{
    memStream.WriteByte(secondString[count++]);
}
' Write the second string to the stream, byte by byte.
count = 0
While(count < secondString.Length)
    memStream.WriteByte(secondString(count))
    count += 1
End While

설명

이 메서드는 WriteByte를 재정의합니다.

MemoryStream byte[] 매개 변수를 사용하여 생성된 경우를 제외하고 확장MemoryStreamMemoryStream 끝에 작업을 씁니다.

적용 대상

추가 정보