Stream.CopyTo Method (Stream)
Reads all the bytes from the current stream and writes them to the destination stream.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Parameters
- destination
- Type: System.IO.Stream
The stream that will contain the contents of the current stream.
| Exception | Condition |
|---|---|
| ArgumentNullException | destination is null. |
| NotSupportedException | The current stream does not support reading. -or- destination does not support writing. |
| ObjectDisposedException | Either the current stream or destination were closed before the CopyTo method was called. |
| IOException | An I/O error occurred. |
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Community Additions
ADD
Show: