TX Text Control .NET Server

DataColumnInfoCollection Class

Class|Introduced in 24.0
Namespace
TXTextControl.DocumentServer.DataSources
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.dll
Implements
ICollection<DataColumnInfo>, IEnumerable<DataColumnInfo>, IEnumerable

Description

An instance of the DataColumnInfoCollection class contains all data columns of a data table in a data source represented through objects of the type DataColumnInfo. The DataColumnInfoCollection class implements the interface ICollection<DocumentServer.DataSources.DataColumnInfo> and therefore also IEnumerable<DocumentServer.DataSources.DataColumnInfo>. This collection class is meant to be read only. For this reason all ICollection members which would cause changes to the collection content (e. g. Add(), Clear() or Remove()) throw a NotSupportedException.

Syntax

public sealed class DataColumnInfoCollection : ICollection<DataColumnInfo>, IEnumerable<DataColumnInfo>, IEnumerable

Examples

The following example includes the item value from a Data Column Info Collection object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Item: {dataColumnInfoCollection[1]}");
Console.WriteLine("Data Column Info Collection is ready for use.");

Members

Properties

PropertyDescription
CountGets the number of elements contained in the collection.
IsReadOnlyGets a value indicating whether the collection is read only. Always returns true.
ItemGets the DataColumnInfo instance with the specified 0-based index from the collection. In C# this property is the indexer for the DataColumnInfoCollection class.

Methods

MethodDescription
AddNot described in the reference. public void Add(DataColumnInfo item);
ClearNot described in the reference. public void Clear();
ContainsNot described in the reference. public bool Contains(DataColumnInfo item);
CopyToCopies the elements of the collection to an array, starting at a particular index.
GetEnumeratorReturns an enumerator that can be used to iterate through the collection.
RemoveNot described in the reference. public bool Remove(DataColumnInfo item);