---
title: "IImageList..::.IndexOfKey Method (Object)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_IImageList_IndexOfKey_1_d02429b3.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/)

# IImageList.IndexOfKey Method (Object)
 
Returns a zero-based index of the specified key in the list.
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)
 
## Syntax
  
```
Function IndexOfKey ( _key As Object _
) As Integer
```
 
```csharp
                int IndexOfKey(Object key
)
```
 
### Parameters
 
 - key
     - Type: [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
The key to locate in the list.
 
### Return Value
A zero-based index of key, if key is found in the list; otherwise, -1.
   
## See Also

### Reference

- [IImageList Interface](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IImageList.htm.md)
- [IndexOfKey Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_IImageList_IndexOfKey.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
