---
id: "T:cAlgo.API.Collections.IReadonlyList`1"
kind: "interface"
namespace: "cAlgo.API.Collections"
url: "https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# IReadonlyList<T> (interface)

Represents a read only collection of a specified type

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public interface IReadonlyList<T>
```

## Examples

C#:

```csharp
IReadonlyList<RobotType> robots = AlgoRegistry.Robots;
for (var i = 0; i < robots.Count; i++)
    Print("cBot {0}: {1}", i, robots[i].Name);
```

Python:

```python
robots = api.AlgoRegistry.Robots
for i in range(robots.Count):
    api.Print(f"cBot {i}: {robots[i].Name}")
```

## Properties

- `int Count {get;}` — The total number of elements contained in the collection [details](https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/Count/index.md)
- `T Item {get;}` — Represents the item contained in the collection at a specific index [details](https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/Item/index.md)

