MemoryStream.CopyTo(Stream, Int32) Methode

Definitie

Leest de bytes uit de huidige geheugenstroom en schrijft deze naar een andere stroom, met behulp van een opgegeven buffergrootte.

public:
 override void CopyTo(System::IO::Stream ^ destination, int bufferSize);
public override void CopyTo(System.IO.Stream destination, int bufferSize);
override this.CopyTo : System.IO.Stream * int -> unit
Public Overrides Sub CopyTo (destination As Stream, bufferSize As Integer)

Parameters

destination
Stream

De stroom waarnaar de inhoud van de huidige geheugenstroom wordt gekopieerd.

bufferSize
Int32

De grootte van de buffer. Deze waarde moet groter zijn dan nul. De standaardgrootte is 81920.

Uitzonderingen

destination is null.

bufferSize is geen positief getal.

De onderliggende geheugenstroom of de destination stream wordt gesloten.

De onderliggende geheugenstroom is onleesbaar.

– of –

De destination stream is ongeschreven.

Van toepassing op