---
title: "LayerCollection..::.Deserialize Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_Deserialize_1_bca7c9fe.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/)

# LayerCollection.Deserialize Method 
 
Deserializes a layer collection.
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls.VectorObjects (in Aurigma.GraphicsMill.WinControls.VectorObjects.dll)
 
## Syntax
  
```
Public Sub Deserialize ( _stream As Stream _
)
```
 
```csharp
public void Deserialize(Stream stream
)
```
 
### Parameters
 
 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
The stream that contains the serialized data.
 
## Remarks
  
To save the layer collection as serialization data, use the [Deserialize(Stream)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_Layer_Deserialize_1_bca7c9fe.htm.md) method.
 
Take into account, when you deserialize a layer collection, it deselects currently selected layer. So if you deserialize layers state you need to specify current layer using the [MultiLayerViewer.CurrentLayer](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_MultiLayerViewer_CurrentLayer.htm.md) property before any manipulations under vector objects.
 
**Note** 
Remember that binary format used for serialization is highly dependent on the build version, as the API may change from version to version, and properties may be added or removed.
   
## See Also

### Reference

- [LayerCollection Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_LayerCollection.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
