FileStreamExtensionsCopyTo Method
Reads the specified amount of bytes from the source FileStream
and writes them to another Stream.
Namespace: DevCase.Extensions.FileStreamExtensionsAssembly: 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(
FileStream source,
Stream destination,
long startPosition,
long count
)
Public Shared Sub CopyTo (
source As FileStream,
destination As Stream,
startPosition As Long,
count As Long
)
Dim source As FileStream
Dim destination As Stream
Dim startPosition As Long
Dim count As Long
FileStreamExtensions.CopyTo(source, destination,
startPosition, count)
public:
static void CopyTo(
FileStream^ source,
Stream^ destination,
long long startPosition,
long long count
)
static member CopyTo :
source : FileStream *
destination : Stream *
startPosition : int64 *
count : int64 -> unit
No code example is currently available or this language may not be supported.
Parameters
- source FileStream
-
The source FileStream.
- destination Stream
-
The Stream to which the contents of the source FileStream will be copied.
- startPosition Int64
-
The zero-based starting position in the FileStream to perform the copy.
- count Int64
-
The number of bytes in the source FileStream 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.