MemoryStreamとは? わかりやすく解説

MemoryStream クラス

バッキング ストアとしてメモリ使用するストリーム作成します

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

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class MemoryStream
    Inherits Stream
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public class MemoryStream : Stream
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class MemoryStream : public
 Stream
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public class MemoryStream extends Stream
SerializableAttribute 
ComVisibleAttribute(true) 
public class MemoryStream extends
 Stream
解説解説

ファイル作成およびテキストファイルへの書き込み例については、「方法 : ファイルテキスト書き込む」を参照してくださいファイルからのテキスト読み取り例については、「方法 : ファイルかテキスト読み取る」を参照してくださいバイナリ ファイル読み取りおよび書き込み例については、「方法 : 新しく作成されデータ ファイルに対して読み書きする」を参照してください

MemoryStream クラスは、バッキング ストアとしてディスクネットワーク接続ではなくメモリ使用するストリーム作成しますMemoryStream は、MemoryStream オブジェクトの作成時に初期化される符号なしバイト配列として格納されるデータカプセル化ます。配列は空の配列としても作成できますカプセル化されたデータは、メモリ直接アクセスできますメモリ ストリーム使用すると、アプリケーションでの一時バッファ一時ファイル必要性を減らすことができます

ストリームcurrent position は、次の読み取りまたは書き込み操作実行される位置です。現在の位置は、Seek メソッド取得または設定できますMemoryStream新しインスタンス作成するときに、現在の位置ゼロ設定されます。

符号なしバイト配列作成したメモリ ストリームには、サイズ変更できないデータストリーム ビュー機能用意されています。これは書き込み専用です。バイト配列使用する場合ストリーム追加したり、ストリーム縮小したりできません。ただし、コンストラクタに渡すパラメータによっては、既存内容変更できることがあります。空のメモリ ストリームは、サイズ変更書き込み、および読み取りを行うことができます

MemoryStream オブジェクトを ResX ファイルまたは .resources ファイル追加した場合実行時に GetStream メソッド呼び出してこのオブジェクト取得します

MemoryStream オブジェクトリソース ファイルシリアル化される場合、このオブジェクト実際には UnmanagedMemoryStream としてシリアル化されます。これにより、パフォーマンス向上するだけでなく、Stream メソッド使用せずデータへのポインタ直接取得できます

Windows Mobile for Pocket PCWindows Mobile for SmartphoneWindows CE プラットフォームメモ : Windows CE では、クリップボードから貼り付けられメモリ ストリームは、クリップボードコピーされメモリ ストリームよりもわずかに大きなサイズ保持できます。元のメモリ ストリーム最後に追加バイト付加できるからです。メモリ ストリーム厳密に受け取るには、オブジェクトメモリ ストリーム受け取方法判断するためのサイズプレフィックスとしてオブジェクト追加するか、メモリ ストリームとそのサイズ文字列値を含む DataObject をクリップボードコピーします

使用例使用例

メモリバッキング ストアとして使用してデータ読み書きする方法の例を次に示します

Imports System
Imports System.IO
Imports System.Text

Module MemStream

    Sub Main()
    
        Dim count As Integer
        Dim byteArray As Byte()
        Dim charArray As Char()
        Dim uniEncoding As New
 UnicodeEncoding()

        ' Create the data to write to the stream.
        Dim firstString As Byte()
 = _
            uniEncoding.GetBytes("Invalid file path characters
 are: ")
        Dim secondString As Byte()
 = _
            uniEncoding.GetBytes(Path.InvalidPathChars)

        Dim memStream As New
 MemoryStream(100)
        Try
            ' Write the first string to the stream.
            memStream.Write(firstString, 0 , firstString.Length)

            ' 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 stream properties to the console.
            Console.WriteLine( _
                "Capacity = {0}, Length = {1}, Position = {2}",
 _
                memStream.Capacity.ToString(), _
                memStream.Length.ToString(), _
                memStream.Position.ToString())

            ' Set the stream position to the beginning of the stream.
            memStream.Seek(0, SeekOrigin.Begin)

            ' Read the first 20 bytes from the stream.
            byteArray = _
                New Byte(CType(memStream.Length,
 Integer)){}
            count = memStream.Read(byteArray, 0, 20)

            ' Read the remaining Bytes, Byte by Byte.
            While(count < memStream.Length)
                byteArray(count) = _
                    Convert.ToByte(memStream.ReadByte())
                count += 1
            End While

            ' Decode the Byte array into a Char array 
            ' and write it to the console.
            charArray = _
                New Char(uniEncoding.GetCharCount(
 _
                byteArray, 0, count)){}
            uniEncoding.GetDecoder().GetChars( _
                byteArray, 0, count, charArray, 0)
            Console.WriteLine(charArray)
        Finally
            memStream.Close()
        End Try

    End Sub
End Module
using System;
using System.IO;
using System.Text;

class MemStream
{
    static void Main()
    {
        int count;
        byte[] byteArray;
        char[] charArray;
        UnicodeEncoding uniEncoding = new UnicodeEncoding();

        // Create the data to write to the stream.
        byte[] firstString = uniEncoding.GetBytes(
            "Invalid file path characters are: ");
        byte[] secondString = uniEncoding.GetBytes(
            Path.InvalidPathChars);

        using(MemoryStream memStream = new
 MemoryStream(100))
        {
            // Write the first string to the stream.
            memStream.Write(firstString, 0 , firstString.Length);

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

            // Write the stream properties to the console.
            Console.WriteLine(
                "Capacity = {0}, Length = {1}, Position = {2}\n",
                memStream.Capacity.ToString(), 
                memStream.Length.ToString(), 
                memStream.Position.ToString());

            // Set the position to the beginning of the stream.
            memStream.Seek(0, SeekOrigin.Begin);

            // Read the first 20 bytes from the stream.
            byteArray = new byte[memStream.Length];
            count = memStream.Read(byteArray, 0, 20);

            // Read the remaining bytes, byte by byte.
            while(count < memStream.Length)
            {
                byteArray[count++] = 
                    Convert.ToByte(memStream.ReadByte());
            }

            // Decode the byte array into a char array 
            // and write it to the console.
            charArray = new char[uniEncoding.GetCharCount(
                byteArray, 0, count)];
            uniEncoding.GetDecoder().GetChars(
                byteArray, 0, count, charArray, 0);
            Console.WriteLine(charArray);
        }
    }
}
using namespace System;
using namespace System::IO;
using namespace System::Text;

int main()
{
   int count;
   array<Byte>^byteArray;
   array<Char>^charArray;
   UnicodeEncoding^ uniEncoding = gcnew UnicodeEncoding;

   // Create the data to write to the stream.
   array<Byte>^firstString = uniEncoding->GetBytes( "Invalid file path
 characters are: " );
   array<Byte>^secondString = uniEncoding->GetBytes( Path::InvalidPathChars
 );

   MemoryStream^ memStream = gcnew MemoryStream( 100 );
   try
   {
      // Write the first string to the stream.
      memStream->Write( firstString, 0, firstString->Length );

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

      
      // Write the stream properties to the console.
      Console::WriteLine( "Capacity = {0}, Length = {1}, "
      "Position = {2}\n", memStream->Capacity.ToString(), memStream->Length.ToString(),
 memStream->Position.ToString() );

      // Set the stream position to the beginning of the stream.
      memStream->Seek( 0, SeekOrigin::Begin );

      // Read the first 20 bytes from the stream.
      byteArray = gcnew array<Byte>(memStream->Length);
      count = memStream->Read( byteArray, 0, 20 );

      // Read the remaining bytes, byte by byte.
      while ( count < memStream->Length )
      {
         byteArray[ count++ ] = Convert::ToByte( memStream->ReadByte() );
      }
      
      // Decode the Byte array into a Char array 
      // and write it to the console.
      charArray = gcnew array<Char>(uniEncoding->GetCharCount( byteArray,
 0, count ));
      uniEncoding->GetDecoder()->GetChars( byteArray, 0, count, charArray,
 0 );
      Console::WriteLine( charArray );
   }
   finally
   {
      memStream->Close();
   }
}
import System.*;
import System.IO.*;
import System.Text.*;

class MemStream
{   
    public static void main(String[]
 args)
    {
        int count;
        ubyte byteArray[];
        char charArray[];
        UnicodeEncoding uniEncoding =  new UnicodeEncoding();

        // Create the data to write to the stream.
        ubyte firstString[] = uniEncoding.GetBytes(
            "Invalid file path characters are: ");
        ubyte secondString[] = uniEncoding.GetBytes(Path.InvalidPathChars);
        MemoryStream memStream =  new MemoryStream(100);
        try {
            // Write the first string to the stream.
            memStream.Write(firstString, 0, firstString.length);
            
            // Write the second string to the stream, byte by byte.
            count = 0;
            while((count < secondString.length)) {
                memStream.WriteByte(secondString[count++]);
            }

            // Write the stream properties to the console.
            Console.WriteLine(
                "Capacity = {0}, Length = {1}, Position = {2}\n", 
                (new Integer( memStream.get_Capacity())).ToString()
,
                (new Long ( memStream.get_Length())).ToString()
,
                (new Long ( memStream.get_Position())).ToString());

            // Set the position to the beginning of the stream.
            memStream.Seek(0, SeekOrigin.Begin);

            // Read the first 20 bytes from the stream.
            byteArray = new ubyte[(int)memStream.get_Length()];
            count = memStream.Read(byteArray, 0, 20);

            // Read the remaining bytes, byte by byte.
            while ((count < memStream.get_Length())) {
                byteArray[count++]= Convert.ToByte(memStream.ReadByte());
            }

            // Decode the byte array into a char array 
            // and write it to the console.
            charArray = new char[uniEncoding.GetCharCount(byteArray
,
                0, count)];
            uniEncoding.GetDecoder().GetChars(byteArray, 0, 
                count, charArray, 0);
            Console.WriteLine(charArray);
        }
        finally {
            memStream.Dispose();
        }
    }//main
} //MemStream
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.IO.Stream
      System.IO.MemoryStream
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ ()

MemoryStream クラス新しインスタンスを、0 に初期化される拡張可能な容量使用して初期化します。

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

public MemoryStream ()
public:
MemoryStream ()
public MemoryStream ()
public function MemoryStream ()
解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ (Byte[], Boolean)

CanWrite プロパティ指定どおりに設定し指定したバイト配列基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

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

Public Sub New ( _
    buffer As Byte(), _
    writable As Boolean _
)
Dim buffer As Byte()
Dim writable As Boolean

Dim instance As New MemoryStream(buffer,
 writable)
public MemoryStream (
    byte[] buffer,
    bool writable
)
public:
MemoryStream (
    array<unsigned char>^ buffer, 
    bool writable
)
public MemoryStream (
    byte[] buffer, 
    boolean writable
)
public function MemoryStream (
    buffer : byte[], 
    writable : boolean
)

パラメータ

buffer

このストリーム作成元の符号なしバイト配列

writable

ストリーム書き込みサポートするかどうか決定する CanWrite プロパティ設定

例外例外
例外種類条件

ArgumentNullException

buffernull 参照 (Visual Basic では Nothing) です。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ (Byte[], Int32, Int32)

バイト配列指定した領域 (インデックス) に基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentNullException

buffernull 参照 (Visual Basic では Nothing) です。

ArgumentOutOfRangeException

index または count が 0 未満です。

ArgumentException

indexcount合計値が、buffer長さ超えてます。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ (Byte[], Int32, Int32, Boolean, Boolean)

指定した CanWrite プロパティ指定した GetBuffer呼び出す機能設定してバイト配列指定した領域に基づき、MemoryStream クラス新しインスタンス初期化します。

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

Public Sub New ( _
    buffer As Byte(), _
    index As Integer, _
    count As Integer, _
    writable As Boolean, _
    publiclyVisible As Boolean _
)
Dim buffer As Byte()
Dim index As Integer
Dim count As Integer
Dim writable As Boolean
Dim publiclyVisible As Boolean

Dim instance As New MemoryStream(buffer,
 index, count, writable, publiclyVisible)
public MemoryStream (
    byte[] buffer,
    int index,
    int count,
    bool writable,
    bool publiclyVisible
)
public:
MemoryStream (
    array<unsigned char>^ buffer, 
    int index, 
    int count, 
    bool writable, 
    bool publiclyVisible
)
public MemoryStream (
    byte[] buffer, 
    int index, 
    int count, 
    boolean writable, 
    boolean publiclyVisible
)
public function MemoryStream (
    buffer : byte[], 
    index : int, 
    count : int, 
    writable : boolean, 
    publiclyVisible : boolean
)

パラメータ

buffer

このストリーム作成元の符号なしバイト配列

index

ストリーム開始する位置bufferインデックス

count

バイト単位ストリーム長。

writable

ストリーム書き込みサポートするかどうか決定する CanWrite プロパティ設定

publiclyVisible

ストリーム作成した符号なしバイト配列返す GetBuffer を有効にする場合trueそれ以外場合false

例外例外
例外種類条件

ArgumentNullException

buffernull 参照 (Visual Basic では Nothing) です。

ArgumentOutOfRangeException

index または count が負の値です。

ArgumentException

バッファ長から index差し引いた値が count より小さい値です。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ (Int32)

MemoryStream クラス新しインスタンスを、指定に従って初期化される拡張可能な容量使用して初期化します。

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

例外例外
例外種類条件

ArgumentOutOfRangeException

capacity が負の値です。

解説解説
使用例使用例

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

Dim memStream As New MemoryStream(100)
using(MemoryStream memStream = new MemoryStream(100))
MemoryStream^ memStream = gcnew MemoryStream( 100 );
MemoryStream memStream =  new MemoryStream(100);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ (Byte[])

指定したバイト配列基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentNullException

buffernull 参照 (Visual Basic では Nothing) です。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ (Byte[], Int32, Int32, Boolean)

CanWrite プロパティ指定どおりに設定しバイト配列指定した領域基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentNullException

buffernull 参照 (Visual Basic では Nothing) です。

ArgumentOutOfRangeException

index または count が負の値です。

ArgumentException

indexcount合計値が、buffer長さ超えてます。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

MemoryStream コンストラクタ

MemoryStream クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
MemoryStream () MemoryStream クラス新しインスタンスを、0 に初期化される拡張可能な容量使用して初期化します。

.NET Compact Framework によってサポートされています。

MemoryStream (Byte[]) 指定したバイト配列基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

MemoryStream (Int32) MemoryStream クラス新しインスタンスを、指定に従って初期化される拡張可能な容量使用して初期化します。

.NET Compact Framework によってサポートされています。

MemoryStream (Byte[], Boolean) CanWrite プロパティ指定どおりに設定し指定したバイト配列基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

MemoryStream (Byte[], Int32, Int32) バイト配列指定した領域 (インデックス) に基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

MemoryStream (Byte[], Int32, Int32, Boolean) CanWrite プロパティ指定どおりに設定しバイト配列指定した領域基づいてサイズ変更できない MemoryStream クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

MemoryStream (Byte[], Int32, Int32, Boolean, Boolean) 指定した CanWrite プロパティ指定した GetBuffer を呼び出す機能設定してバイト配列指定した領域に基づきMemoryStream クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

参照参照

MemoryStream プロパティ


MemoryStream メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド BeginRead  非同期読み込み動作開始します。 ( Stream から継承されます。)
パブリック メソッド BeginWrite  非同期書き込み操作開始します。 ( Stream から継承されます。)
パブリック メソッド Close  現在のストリーム閉じ現在のストリーム関連付けられているすべてのリソース (ソケットファイル ハンドルなど) を解放します。 ( Stream から継承されます。)
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド Dispose オーバーロードされます。  
パブリック メソッド EndRead  保留中の非同期読み取り完了するまで待機します。 ( Stream から継承されます。)
パブリック メソッド EndWrite  非同期書き込み操作終了します。 ( Stream から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド Flush オーバーライドされます操作実行されないように、Stream.Flush をオーバーライドます。
パブリック メソッド GetBuffer このストリーム作成元の符号なしバイト配列返します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド Read オーバーライドされます現在のストリームからバイトブロック読み取りデータbuffer書き込みます
パブリック メソッド ReadByte オーバーライドされます現在のストリームからバイト読み取ります。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Seek オーバーライドされます現在のストリーム内の位置指定した値に設定します
パブリック メソッド SetLength オーバーライドされます現在のストリーム長を指定した値に設定します
パブリック メソッド Synchronized  指定した Stream オブジェクトラップするスレッド セーフな (同期された) ラッパー作成します。 ( Stream から継承されます。)
パブリック メソッド ToArray Position プロパティには関係なく、ストリーム内容バイト配列書き込みます
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
パブリック メソッド Write オーバーライドされますバッファから読み取ったデータ使用して現在のストリームバイトブロック書き込みます
パブリック メソッド WriteByte オーバーライドされます現在のストリーム内の現在位置1 バイト書き込みます
パブリック メソッド WriteTo メモリ ストリーム内容全体別のストリーム書き込みます
プロテクト メソッドプロテクト メソッド
参照参照

MemoryStream メンバ

バッキング ストアとしてメモリ使用するストリーム作成します

MemoryStream データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド BeginRead  非同期読み込み動作開始します。 (Stream から継承されます。)
パブリック メソッド BeginWrite  非同期書き込み操作開始します。 (Stream から継承されます。)
パブリック メソッド Close  現在のストリーム閉じ現在のストリーム関連付けられているすべてのリソース (ソケットファイル ハンドルなど) を解放します。 (Stream から継承されます。)
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 (MarshalByRefObject から継承されます。)
パブリック メソッド Dispose オーバーロードされます。  
パブリック メソッド EndRead  保留中の非同期読み取り完了するまで待機します。 (Stream から継承されます。)
パブリック メソッド EndWrite  非同期書き込み操作終了します。 (Stream から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド Flush オーバーライドされます操作実行されないように、Stream.Flush をオーバーライドます。
パブリック メソッド GetBuffer このストリーム作成元の符号なしバイト配列返します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド Read オーバーライドされます現在のストリームからバイトブロック読み取りデータbuffer書き込みます
パブリック メソッド ReadByte オーバーライドされます現在のストリームからバイト読み取ります。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Seek オーバーライドされます現在のストリーム内の位置指定した値に設定します
パブリック メソッド SetLength オーバーライドされます現在のストリーム長を指定した値に設定します
パブリック メソッド Synchronized  指定した Stream オブジェクトラップするスレッド セーフな (同期された) ラッパー作成します。 (Stream から継承されます。)
パブリック メソッド ToArray Position プロパティには関係なく、ストリーム内容バイト配列書き込みます
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
パブリック メソッド Write オーバーライドされますバッファから読み取ったデータ使用して現在のストリームバイトブロック書き込みます
パブリック メソッド WriteByte オーバーライドされます現在のストリーム内の現在位置1 バイト書き込みます
パブリック メソッド WriteTo メモリ ストリーム内容全体別のストリーム書き込みます
プロテクト メソッドプロテクト メソッド
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「MemoryStream」の関連用語

MemoryStreamのお隣キーワード
検索ランキング

   

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



MemoryStreamのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS