Represents a generic List structure.
T
: The type of the List.
Length
|Size
|Count
: Gets the amount of elements in theList
.
Add(T obj)
: Addsobj
T
to theList
.Add(T[] objs)
: Adds all elements inobjs
T[]
to theList
.GetAmountOf(T obj)
: Gets anint
with the number of timesobj
T
appears in theList
.RemoveAt(int index)
: Removes the element at positionint
index
from theList
.Remove(T obj, bool DeleteAll)
: Removes either firstDeleteAll = false
or allDeleteAll = true
instances ofT
obj
from theList
.
UList()
: Initializes a new emptyUList
.UList(T[] objs)
: Initializes a newUList
withT[]
objs
in it.
-
using UtilityLib.UDataTypes; ... static void Main(String[] args){ UList<int> MyList = new UList<int>(); }
-
using UtilityLib.UDataTypes; ... static void Main(String[] args){ int[] IntArray = new int[5] {0, 1, 2, 3, 4}; UList<int> MyList = new UList<int>(IntArray); }