---
title: "FormatWriter..::.Close Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatWriter_Close.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# FormatWriter.Close Method 
 
Closes format writer, flushes all unsaved data, and detaches the writer from previously opened file (or other media).
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Overridable Sub Close
```
 
```csharp
public virtual void Close()
```
 
### Implements
 
[IFormatWriter.Close()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_IFormatWriter_Close.htm.md)
 
## Remarks
  
You should always use this method to detach from opened file (or other media). As soon as you call [Open(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatWriter_Open_1_bb3a7a4f.htm.md) method, file will be locked until you close the writer.
 
If you close the writer which has not been opened, the method does nothing. So you need not do any checks to ensure if writer is opened to close it.
   
## See Also

### Reference

- [FormatWriter Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatWriter.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
