IntList Class |
The IntList class defines a type safe list of integers.
Inheritance Hierarchy
Namespace: Tekla.Structures.Drawing
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
The IntList type exposes the following members.
Constructors
Properties
Methods
Name | Description | |
---|---|---|
Add |
Adds a new integer to the end of the string list.
| |
Contains |
Checks if the given integer is in the list.
| |
GetRange |
Gets a sub-list of the integer list.
| |
IndexOf(Int32) |
Gets the index of the specified integer.
| |
IndexOf(Int32, Int32) |
Gets the index of the specified integer between the index to start
the search from and the end of the list.
| |
IndexOf(Int32, Int32, Int32) |
Gets the index of the specified integer between the index to start the search from and startIndex + count.
| |
Insert |
Inserts the integer to the specified index.
| |
IsEqual |
Compares the current object with an object of the same type.
| |
LastIndexOf(Int32) |
Searches for the last occurence of the integer in the list.
| |
LastIndexOf(Int32, Int32) |
Searches for the last occurence of the integer in the list.
| |
LastIndexOf(Int32, Int32, Int32) |
Searches for the last occurence of the integer in the list.
| |
Remove |
Removes the first occurence of the integer from the list.
| |
RemoveRange |
Removes a range of items starting from the given index.
| |
ToArray |
Copies the integers to an integer array.
|
Examples
The following example adds some integers to the list and calculates the sum of them:
using Tekla.Structures.Drawing; public class Example { public void Example1() { int Sum = 0; IntList MyIntList = new IntList(); MyIntList.Add(1); MyIntList.Add(2); MyIntList.Add(5); foreach(int MyInt in MyIntList) { Sum += MyInt; } } }
See Also