SetSendStream Method
Sets the stream to be sent.
Syntax
[VB.NET] Public Sub SetSendStream(ByVal SendStream As System.IO.Stream, ByVal Filename As String)
[C#] public void SetSendStream(System.IO.Stream sendStream, string filename);
Remarks
This method sets the stream to be sent to the recipient. Filename specifies the name of the file. If an upload stream is set before the SendFile method is called, the content of the stream will be read by the component and sent. The stream should be open and normally set to position 0.
The component will automatically close this stream if CloseStreamAfterTransfer is true (default). If the stream is closed, you will need to call SetSendStream again before calling SendFile again.
The content of the stream will be read from the current position all the way to the end.
Note: SetSendStream and LocalFile will reset the other.
NOTE: This method has a corresponding asynchronous version (SetSendStreamAsync) for use in the Xamarin environment.