Count Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets the number of elements contained in the collection.
Syntax
public int Count { get; }Public ReadOnly Property Count As IntegerExamples
The following example works with tables of contents in the current document by using TableOfContentsCollection.Count.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
TableOfContentsCollection tableOfContentsCollection = textControl.TablesOfContents;
tableOfContentsCollection.Add(new TableOfContents(1, 3) { Name = "Contents", ID = 100 });
Console.WriteLine($"Count: {tableOfContentsCollection.Count}");
Console.WriteLine("Table Of Contents Collection is ready for use.");textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim tableOfContentsCollection As TableOfContentsCollection = textControl.TablesOfContents
tableOfContentsCollection.Add(New TableOfContents(1, 3) With { .Name = "Contents", .ID = 100 })
Console.WriteLine($"Count: {tableOfContentsCollection.Count}")
Console.WriteLine("Table Of Contents Collection is ready for use.")Limitations
Read only.