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