Tekla Open API

Detailed and full API reference helps you master Tekla Open API

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

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: 2018.1.0.0 (2018.1.0.0)
Syntax
[SerializableAttribute]
public sealed class IntList : CollectionBase

The IntList type exposes the following members.

Constructors
  Name Description
Public method IntList
Initializes a new instance of the IntList class
Top
Properties
  Name Description
Public property Item
Gets or sets the integer at the specified index.
Top
Methods
  Name Description
Public method Add
Adds a new integer to the end of the string list.
Public method Contains
Checks if the given integer is in the list.
Public method GetRange
Gets a sub-list of the integer list.
Public method IndexOf(Int32)
Gets the index of the specified integer.
Public method IndexOf(Int32, Int32)
Gets the index of the specified integer between the index to start the search from and the end of the list.
Public method IndexOf(Int32, Int32, Int32)
Gets the index of the specified integer between the index to start the search from and startIndex + count.
Public method Insert
Inserts the integer to the specified index.
Public method IsEqual
Compares the current object with an object of the same type.
Public method LastIndexOf(Int32)
Searches for the last occurence of the integer in the list.
Public method LastIndexOf(Int32, Int32)
Searches for the last occurence of the integer in the list.
Public method LastIndexOf(Int32, Int32, Int32)
Searches for the last occurence of the integer in the list.
Public method Remove
Removes the first occurence of the integer from the list.
Public method RemoveRange
Removes a range of items starting from the given index.
Public method ToArray
Copies the integers to an integer array.
Top
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