Re: [Vala] How to obtain number of elements in array
- From: "Jaap A. Haitsma" <jaap haitsma org>
- To: vala-list gnome org
- Subject: Re: [Vala] How to obtain number of elements in array
- Date: Sun, 27 Apr 2008 23:22:17 +0200
On Sun, Apr 27, 2008 at 11:16 PM, Jaap A. Haitsma <jaap haitsma org> wrote:
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();
OK found it. It's
num = x.length;
Jaap
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]