Click or drag to resize

IOUtilitiesCopyTo Method

Reads the bytes from the current stream and writes them to another stream.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static long CopyTo(
	this Stream input,
	Stream output,
	long count = 9223372036854775807,
	int bufferSize = 81920
)

Parameters

input
Type: System.IOStream
The stream to read from.
output
Type: System.IOStream
The stream to write to.
count (Optional)
Type: SystemInt64
The maximum number of bytes to copy.
bufferSize (Optional)
Type: SystemInt32
The size of the buffer. This value must be greater than zero. The default size is 81920.

Return Value

Type: Int64
The number of bytes read and written.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptioninput is null or output is null.
ArgumentExceptioncount or bufferSize are invalid.
See Also