Package.Flush Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves the contents of all parts and relationships that are contained in the package.
public:
void Flush();
public void Flush();
member this.Flush : unit -> unit
Public Sub Flush ()
The package is not open (Dispose(Boolean) or Close() has been called).
The package is read-only and cannot be modified.
Flush internally calls the derived class's FlushCore implementation to perform the actual format-specific flush operation. The derived class's FlushCore method is responsible for actually saving the part and relationship content to the specific physical derived class implementation.
By default, a ZipPackage derived implementation of the abstract Package base class is provided and used. In the default operation, Flush internally calls FlushCore to save the parts and relationships in a ZIP file package.
Flush is called automatically by the Close and Dispose methods. When Close or Dispose is called you do not have to call Flush separately.
Flush() internally calls the derived class's FlushCore() method to actually flush the part based on the physical format implemented in the derived class.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: