StreamExtensionsCopyTo Method
Reads the specified amount of bytes from the source Stream
and writes them to another Stream.
Namespace: DevCase.Extensions.StreamExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void CopyTo(
Stream source,
Stream destination,
long startPosition,
long count
)
Public Shared Sub CopyTo (
source As Stream,
destination As Stream,
startPosition As Long,
count As Long
)
Dim source As Stream
Dim destination As Stream
Dim startPosition As Long
Dim count As Long
StreamExtensions.CopyTo(source, destination,
startPosition, count)
public:
static void CopyTo(
Stream^ source,
Stream^ destination,
long long startPosition,
long long count
)
static member CopyTo :
source : Stream *
destination : Stream *
startPosition : int64 *
count : int64 -> unit
No code example is currently available or this language may not be supported.
Parameters
- source Stream
-
The source Stream.
- destination Stream
-
The Stream to which the contents of the source Stream will be copied.
- startPosition Int64
-
The zero-based starting position in the Stream to perform the copy.
- count Int64
-
The number of bytes in the source Stream to copy.
This is a code example.
No code example is currently available or this language may not be supported.
Dim sourceFile As String = "C:\file.bin"
Using sourcce As New FileStream(sourceFile, FileMode.Open), destination As New MemoryStream()
sourcce.CopyTo(destination, startPosition:=0, count:=1024)
Console.WriteLine($"Destination stream lengh: {destination.Length}")
End Using
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.