MemoryStream.WriteByte メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MemoryStream.WriteByte メソッドの意味・解説 

MemoryStream.WriteByte メソッド

現在のストリーム内の現在位置に 1 バイトを書き込みます。

名前空間: System.IO
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Overrides Sub WriteByte
 ( _
    value As Byte _
)
Dim instance As MemoryStream
Dim value As Byte

instance.WriteByte(value)
public:
virtual void WriteByte (
    unsigned char value
) override
public void WriteByte (
    byte value
)

パラメータ

value

書き込むバイト。

例外例外
例外の種類条件

NotSupportedException

ストリームが書き込みをサポートしません。詳細については、CanWrite のトピックを参照してください。

または

現在の位置がストリームの末尾になっており、容量を変更できません。

ObjectDisposedException

現在のストリームが閉じています。

解説解説
使用例使用例

このコード例は、MemoryStream クラスのトピックで取り上げているコード例の一部分です。

' Write the second string to the stream, byte by byte.
count = 0
While(count < secondString.Length)
    memStream.WriteByte(secondString(count))
    count += 1
End While
// 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++]);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

MemoryStream.WriteByte メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



MemoryStream.WriteByte メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS