[Vala] How to obtain number of elements in array
- From: "Jaap A. Haitsma" <jaap haitsma org>
- To: vala-list gnome org
- Subject: [Vala] How to obtain number of elements in array
- Date: Sun, 27 Apr 2008 23:16:42 +0200
Hi,
How do I obtain that the following string array has two elements
const string[] x = {
"string1",
"string2"
};
Ofcourse I can do something like
num = 0;
foreach (string y in x) {
num++;
}
but I'm looking for something to obtain it at once
So something like
num = x.length();
Thanks
Jaap
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]