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

The IntList type exposes the following members.

Constructors
  NameDescription
Public methodIntList
Initializes a new instance of the IntList class
Top
Properties
  NameDescription
Public propertyItem
Gets or sets the integer at the specified index.
Top
Methods
  NameDescription
Public methodAdd
Adds a new integer to the end of the string list.
Public methodContains
Checks if the given integer is in the list.
Public methodGetRange
Gets a sub-list of the integer list.
Public methodIndexOf(Int32)
Gets the index of the specified integer.
Public methodIndexOf(Int32, Int32)
Gets the index of the specified integer between the index to start the search from and the end of the list.
Public methodIndexOf(Int32, Int32, Int32)
Gets the index of the specified integer between the index to start the search from and startIndex + count.
Public methodInsert
Inserts the integer to the specified index.
Public methodIsEqual
Compares the current object with an object of the same type.
Public methodLastIndexOf(Int32)
Searches for the last occurence of the integer in the list.
Public methodLastIndexOf(Int32, Int32)
Searches for the last occurence of the integer in the list.
Public methodLastIndexOf(Int32, Int32, Int32)
Searches for the last occurence of the integer in the list.
Public methodRemove
Removes the first occurence of the integer from the list.
Public methodRemoveRange
Removes a range of items starting from the given index.
Public methodToArray
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next