MemoryStream.WriteByte(Byte) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の位置にある現在のストリームにバイトを書き込みます。
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
書き込むバイト。
例外
現在のストリームが閉じています。
例
このコード例は、 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))
count += 1
End While
注釈
このメソッドは、WriteByte をオーバーライドします。
byte[] パラメーターを使用して構築された MemoryStream を除き、 MemoryStream の末尾に書き込み操作を実行すると、 MemoryStreamが展開されます。