OpenPetra
Free Administration Software for Non-Profits
|
A wrapper around System.Collections.ArrayList, that allows to use the index property even beyond the existing count of objects More...
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... | |
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>
|
inline |
remove elements that are not needed anymore
|
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