OpenPetra
Free Administration Software for Non-Profits
Ict.Common.TSelfExpandingArrayList Class Reference

A wrapper around System.Collections.ArrayList, that allows to use the index property even beyond the existing count of objects More...

Inheritance diagram for Ict.Common.TSelfExpandingArrayList:

Public Member Functions

void Compact ()
 remove elements that are not needed anymore More...
 

Properties

override Object this[int i] [get, set]
 property for the elements; you can assign elements to any position: the array will be increased and filled with null values in between the assigned values More...
 

Detailed Description

A wrapper around System.Collections.ArrayList, that allows to use the index property even beyond the existing count of objects

TSelfExpandingArrayList myArray = new TSelfExpandingArrayList(); myArray[5] = "test5"; myArray[3] = "test3"; myArray[7] = "test7"; for (Int32 i = 0; i < myArray.Count; i++) { if (myArray[i] != null) { System.Console.Writeline(i.ToString() + " " + myArray[i].ToString()); } }

myArray.Compact();

for (Int32 i = 0; i < myArray.Count; i++) { if (myArray[i] != null) { System.Console.Writeline(i.ToString() + " " + myArray[i].ToString()); } } /example>

Member Function Documentation

◆ Compact()

void Ict.Common.TSelfExpandingArrayList.Compact ( )
inline

remove elements that are not needed anymore

Property Documentation

◆ this[int i]

override Object Ict.Common.TSelfExpandingArrayList.this[int i]
getset

property for the elements; you can assign elements to any position: the array will be increased and filled with null values in between the assigned values


The documentation for this class was generated from the following file: