| Visual Basic (Declaration) | |
|---|---|
Public Overloads Sub WriteTo( _ ByVal destination As Stream _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As EnhancedStream Dim destination As Stream instance.WriteTo(destination) | |
| C# | |
|---|---|
public void WriteTo( Stream destination ) | |
| Managed Extensions for C++ | |
|---|---|
public: void WriteTo( Stream* destination ) | |
| C++/CLI | |
|---|---|
public: void WriteTo( Stream^ destination ) | |
Parameters
- destination
- The destination stream.
| Exception | Description |
|---|---|
| System.NullReferenceException | destination is null. |
| System.IO.IOException | Stream is not readable or writeable. |
This method essentially "copies" one stream to another by setting the destination Stream position to zero, writing all of the data in the source Stream to the destination, resetting the source Stream back to its original position, and resetting the destination to a position of zero.
Target Platforms: Microsoft .NET Framework 2.0