Skip to content

IReadonlyList

interface cAlgo.API.Collections

DesktopCLICloud

Represents a read only collection of a specified type

Definition

public interface IReadonlyList<T>

Namespace: cAlgo.API.Collections · Group: Collections

Examples

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

Properties

Name Description
CountDesktopCLICloudint The total number of elements contained in the collection
ItemDesktopCLICloudT Represents the item contained in the collection at a specific index