Skip to content

TableCollection Class

Contains information about all the tables in a Windows Installer database.

MethodDescription
Add(item)Adds a new table to the database.
Clear()Removes all tables (and all data) from the database.
Contains(item)Checks if the database contains a table with the given name.
CopyTo(array, arrayIndex)Copies the table information from this collection into an array.
GetEnumerator()Enumerates the tables in the database.
Remove(item)Removes a table from the database.
PropertyDescription
CountGets the number of tables in the database.
IsReadOnlyGets a boolean value indicating whether the collection is read-only. A TableCollection is read-only when the database is read-only.
ItemGets information about a given table.
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Adds a new table to the database.

public void Add(
TableInfo item
)
ParameterTypeDescription
itemTableInfoinformation about the table to be added
ExceptionDescription
T:System.InvalidOperationExceptiona table with the same name already exists in the database

Removes all tables (and all data) from the database.

public void Clear()

Checks if the database contains a table with the given name.

public bool Contains(
string item
)
ParameterTypeDescription
itemstringcase-sensitive name of the table to search for

bool True if the table exists, false otherwise.

Copies the table information from this collection into an array.

public void CopyTo(
TableInfo[] array,
int arrayIndex
)
ParameterTypeDescription
arrayTableInfo[]destination array to be filed
arrayIndexintoffset into the destination array where copying begins

Enumerates the tables in the database.

public IEnumerator<WixToolset.Dtf.WindowsInstaller.TableInfo> GetEnumerator()

Removes a table from the database.

public bool Remove(
string item
)
ParameterTypeDescription
itemstringcase-sensitive name of the table to be removed

bool true if the table was removed, false if the table did not exist

Gets the number of tables in the database.

public int Count { get; set; }

Gets a boolean value indicating whether the collection is read-only. A TableCollection is read-only when the database is read-only.

public bool IsReadOnly { get; set; }

Gets information about a given table.

public TableInfo Item[
string table
] { get; set; }
ParameterTypeDescription
tablestringcase-sensitive name of the table