PowerTCP Mail for .NET
WriteTo(Stream,Boolean) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > EnhancedStream Class > WriteTo Method : WriteTo(Stream,Boolean) Method




destination
The destination stream.
resetPosition
Controls whether or not the positions of the source and destination streams are reset during the "copy" process.
Writes all of the data contained in this Stream to a destination Stream.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub WriteTo( _
   ByVal destination As Stream, _
   ByVal resetPosition As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As EnhancedStream
Dim destination As Stream
Dim resetPosition As Boolean
 
instance.WriteTo(destination, resetPosition)
C# 
public void WriteTo( 
   Stream destination,
   bool resetPosition
)
Managed Extensions for C++ 
public: void WriteTo( 
   Stream* destination,
   bool resetPosition
) 
C++/CLI 
public:
void WriteTo( 
   Stream^ destination,
   bool resetPosition
) 

Parameters

destination
The destination stream.
resetPosition
Controls whether or not the positions of the source and destination streams are reset during the "copy" process.

Exceptions

ExceptionDescription
System.NullReferenceExceptiondestination is null.
System.IO.IOExceptionStream is not readable or writeable.

Remarks

If resetPositions is true, 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.

If resetPositions is false, it copies from the current location of the source Stream to the current location of destination, and positions are not set.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.