Skip to main content

OpenTD .NET8 reference 2025 R2

OpenTD.Utility.UniqueItemList< T > Class Template Reference

Last update: 16.07.2025

Acts like a List, except Add and Insert will remove existing items that equal the added/inserted item (according to its definition of Equals) More...

Inheritance diagram for OpenTD.Utility.UniqueItemList< T >:

Public Member Functions

void Add (T item)
 Will remove any existing item that equals the added item.
 
void Clear ()
 
bool Contains (T item)
 
void CopyTo (T[] array, int arrayIndex)
 
IEnumerator< T > GetEnumerator ()
 
int IndexOf (T item)
 
void Insert (int index, T item)
 Will remove any existing item that equals the inserted item.
 
bool Remove (T item)
 
void RemoveAt (int index)
 
int RemoveAll (Predicate< T > match)
 

Properties

T this[int index] [get, set]
 
int Count [get]
 
bool IsReadOnly [get]
 

Detailed Description

Acts like a List, except Add and Insert will remove existing items that equal the added/inserted item (according to its definition of Equals)

Template Parameters
T

Member Function Documentation

◆ Add()

void OpenTD.Utility.UniqueItemList< T >.Add ( T item)
inline

Will remove any existing item that equals the added item.

Parameters
item

◆ Clear()

void OpenTD.Utility.UniqueItemList< T >.Clear ( )
inline

◆ Contains()

bool OpenTD.Utility.UniqueItemList< T >.Contains ( T item)
inline

◆ CopyTo()

void OpenTD.Utility.UniqueItemList< T >.CopyTo ( T[] array,
int arrayIndex )
inline

◆ GetEnumerator()

IEnumerator< T > OpenTD.Utility.UniqueItemList< T >.GetEnumerator ( )
inline

◆ IndexOf()

int OpenTD.Utility.UniqueItemList< T >.IndexOf ( T item)
inline

◆ Insert()

void OpenTD.Utility.UniqueItemList< T >.Insert ( int index,
T item )
inline

Will remove any existing item that equals the inserted item.

Parameters
item

◆ Remove()

bool OpenTD.Utility.UniqueItemList< T >.Remove ( T item)
inline

◆ RemoveAll()

int OpenTD.Utility.UniqueItemList< T >.RemoveAll ( Predicate< T > match)
inline

◆ RemoveAt()

void OpenTD.Utility.UniqueItemList< T >.RemoveAt ( int index)
inline

Property Documentation

◆ Count

int OpenTD.Utility.UniqueItemList< T >.Count
get

◆ IsReadOnly

bool OpenTD.Utility.UniqueItemList< T >.IsReadOnly
get

◆ this[int index]

T OpenTD.Utility.UniqueItemList< T >.this[int index]
getset

The documentation for this class was generated from the following file:
  • C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/OpenTD/OpenTD/Utility/UniqueItemList.cs

Connect with Ansys