Represents a non-generic collection of objects that can be individually accessed by index.

interface IList {
    Item: PropertyGet<number | Int32, unknown> & PropertySet<number | Int32, any>;
    get Count(): number;
    get IsFixedSize(): boolean;
    get IsReadOnly(): boolean;
    Add(value: any): number;
    Add(value: any): number;
    Cast<T1, T2>(this: T2, type: TypeRef<T1>): T1;
    Clear(): void;
    Contains(value: any): boolean;
    Contains(value: any): boolean;
    IndexOf(value: any): number;
    IndexOf(value: any): number;
    Insert(index: number | Int32, value: any): void;
    Insert(index: number | Int32, value: any): void;
    Remove(value: any): void;
    Remove(value: any): void;
    RemoveAt(index: number | Int32): void;
    TryCast<T1, T2>(this: T2, type: TypeRef<T1>): null | T1;
    [iterator](): Iterator<unknown, any, undefined>;
}

Hierarchy (view full)

Properties

Item: PropertyGet<number | Int32, unknown> & PropertySet<number | Int32, any>

Gets or sets the element at the specified index.

The zero-based index of the element to get or set.

The element at the specified index.

Accessors

Methods

  • Adds an item to the System.Collections.IList.

    Parameters

    Returns number

    The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection.

  • Adds an item to the System.Collections.IList.

    Parameters

    Returns number

    The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection.

  • Casts this object to the specified type. Throws error on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns T1

  • Removes the System.Collections.IList item at the specified index.

    Parameters

    • index: number | Int32

      The zero-based index of the item to remove.

    Returns void

  • Casts this object to the specified type. Returns null on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns null | T1

  • Returns Iterator<unknown, any, undefined>