The requested page is not available for the requested platform. You are viewing the content for Default platform.

IFileData.SaveToStream(Stream) Method

Saves the file stored within the current IFileData object to the specified stream.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.Persistent.Base.v18.2.dll


void SaveToStream(
    Stream stream
Sub SaveToStream(
    stream As Stream


Name Type Description
stream Stream

A Stream object to be used to save the file.


You can use the SaveToStream method to save a file into a Stream from a FileData type property of a business object:

using(var stream = new MemoryStream()) {
    Resume fileDataHolder = (Resume)View.CurrentObject;
    if(fileDataHolder.File != null) {
         // Process the saved stream as required:
         // stream.Position = 0;
         // ...

Here, FileData is a built-in class implementing the IFileData interface.

See Also