[Vala] Difference between Gee.List and ArrayList
- From: "Jaap A. Haitsma" <jaap haitsma org>
- To: vala-list gnome org
- Subject: [Vala] Difference between Gee.List and ArrayList
- Date: Mon, 21 Apr 2008 07:43:16 +0200
Hi,
I'm wondering why the program below compiles.
using GLib, Gee;
public class GListTest {
static int main (string[] args) {
Gee.List list = new ArrayList<string> ();
list.add ("TestString1");
list.add ("myTest");
list[0] = "blah";
message ("list.size=%d", list.size);
for ( int i = 0; i < list.size; i++) {
message ("%s", list[i]);
}
return 0;
}
}
However when I change "Gee.List list = new ArrayList<string> ();" to
"var list = new ArrayList<string> ();" it doesn't
Jaap
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]