---
title: "LayerCollection..::.GetObjectData Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_GetObjectData_2_c341f0d6.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.GetObjectData Method 
 
Populates a [SerializationInfo](http://msdn2.microsoft.com/en-us/a9b6042e) with the data needed to serialize the collection object.
 
**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
  
```
<SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter := True)> _
Public Overridable Sub GetObjectData ( _info As SerializationInfo, _context As StreamingContext _
)
```
 
```csharp
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
public virtual void GetObjectData(SerializationInfo info,StreamingContext context
)
```
 
### Parameters
 
 - info
     - Type: [System.Runtime.Serialization.SerializationInfo](http://msdn2.microsoft.com/en-us/a9b6042e)
The [SerializationInfo](http://msdn2.microsoft.com/en-us/a9b6042e) to populate with data.

 - context
     - Type: [System.Runtime.Serialization.StreamingContext](http://msdn2.microsoft.com/en-us/t16abws5)
The destination (see [StreamingContext](http://msdn2.microsoft.com/en-us/t16abws5)) for this serialization.
 
### Implements
 
[ISerializable.GetObjectData(SerializationInfo, StreamingContext)](http://msdn2.microsoft.com/en-us/27cxsdk6)
   
## 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)
