---
title: "LayerCollection Methods "
canonical: https://www.graphicsmill.com/docs/gm5/Methods_T_Aurigma_GraphicsMill_WinControls_LayerCollection.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 Methods 
 
The [LayerCollection](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_LayerCollection.htm.md) type exposes the following members.
 
## Methods

|   |  Name |  Description |
| --- | --- | --- |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Add](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_LayerCollection_Add.htm.md) |  Overloaded. <br>Adds an object to the end of the layer collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Clear](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_Clear.htm.md) |  Removes all layers from the collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Contains](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_LayerCollection_Contains.htm.md) |  Overloaded. <br>Determines whether an object is in the layer collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [CopyTo](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_CopyTo_2_f1b35db6.htm.md) |  Copies the collection to a one-dimensional array, starting at the specified index of the target array. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Deserialize](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_Deserialize_1_bca7c9fe.htm.md) |  Deserializes a layer collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Equals](http://msdn2.microsoft.com/en-us/bsc2ak47) |  (Inherited from [Object](http://msdn2.microsoft.com/en-us/e5kfa45b).) |
 |  ![Protected method](https://www.graphicsmill.com/docs/gm5/icons/protmethod.gif) |  [Finalize](http://msdn2.microsoft.com/en-us/4k87zsw7) |  (Inherited from [Object](http://msdn2.microsoft.com/en-us/e5kfa45b).) |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [GetEnumerator](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_GetEnumerator.htm.md) |  Returns an enumerator for the layers allowing the collection to be used in **foreach** blocks. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [GetHashCode](http://msdn2.microsoft.com/en-us/zdee4b3y) |  (Inherited from [Object](http://msdn2.microsoft.com/en-us/e5kfa45b).) |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [GetObjectData](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_GetObjectData_2_c341f0d6.htm.md) |  Populates a [SerializationInfo](http://msdn2.microsoft.com/en-us/a9b6042e) with the data needed to serialize the collection object. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [GetType](http://msdn2.microsoft.com/en-us/dfwy45w9) |  (Inherited from [Object](http://msdn2.microsoft.com/en-us/e5kfa45b).) |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [IndexOf](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_LayerCollection_IndexOf.htm.md) |  Overloaded. <br>Searches for the specified object and returns the zero-based index of the first occurrence within the entire layer collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Insert](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_LayerCollection_Insert.htm.md) |  Overloaded. <br>Inserts an object into the layer collection at the specified index. |
 |  ![Protected method](https://www.graphicsmill.com/docs/gm5/icons/protmethod.gif) |  [MemberwiseClone](http://msdn2.microsoft.com/en-us/57ctke0a) |  (Inherited from [Object](http://msdn2.microsoft.com/en-us/e5kfa45b).) |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Remove](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_LayerCollection_Remove.htm.md) |  Overloaded. <br>Removes the first occurrence of a specific object from the layer collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [RemoveAt](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_RemoveAt_1_e1836fc4.htm.md) |  Removes the layer at the specified index of the collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [Serialize](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_Serialize_1_bca7c9fe.htm.md) |  Serializes a layer collection. |
 |  ![Public method](https://www.graphicsmill.com/docs/gm5/icons/pubmethod.gif) |  [ToString](http://msdn2.microsoft.com/en-us/7bxwbwt2) |  (Inherited from [Object](http://msdn2.microsoft.com/en-us/e5kfa45b).) |
 
## Explicit Interface Implementations

|   |  Name |  Description |
| --- | --- | --- |
 |  ![Explicit interface implemetation](https://www.graphicsmill.com/docs/gm5/icons/pubinterface.gif) ![Private method](https://www.graphicsmill.com/docs/gm5/icons/privmethod.gif) |  [ICollection.CopyTo](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_LayerCollection_System_Collections_ICollection_CopyTo_2_d6abc6ee.htm.md) |   |
   
## 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)
