IntArray
To represent a list of
int
values, BI# offers the
IntArray
type. To create an empty
IntArray
object, you can use the
CreateIntArray
function. Alternatively, you can create
and initialize an
IntArray
object by using a list of numbers in square
brackets:
void IntArrayDemo() { IntArray numbers = [1, 2, 42]; foreach (int x in numbers) { WriteLine(x); } WriteLine("numbers contains " + Count(numbers) + " elements."); }