[Vala] how to access the length attribute of multi dimensional arrays?
- From: Seth Hoenig <seth a hoenig gmail com>
- To: vala-list gnome org
- Subject: [Vala] how to access the length attribute of multi dimensional arrays?
- Date: Thu, 1 Jul 2010 18:26:59 -0500
So if I pass a matrix to a function (or any multidimensional array), I can
only seem to access the .length attribute of the first dimension. Is there a
way to access the .length attributes of the other dimensions of the array?
public Something(int[,] arr)
{
_n_rows = arr.length;
_n_cols = arr[0, ].length; // no compile :(
}
In the example above, I can't seem to find a way to find out how many
columns are in my matrix.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]