Skip to content
Discussion options

You must be logged in to vote

You can look at the example how to print an element: examples60\rosetta\arrays\

There are plenty of ways how to work with collections. You can work with them like with arrays:

auto list := new ArrayList();
list.append(1).append(2).append(3);

for(int i := 0; i < list.Length; i++) {
   Console.printLine(list[i])
};

Or as with an enumarable:

list.forEach::(item)
{
    Console.printLine(item)
};

Or

foreach(var item; in list) {
    Console.printLine(item)
};

Replies: 9 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@arakov
Comment options

Comment options

You must be logged in to vote
1 reply
@arakov
Comment options

Comment options

You must be logged in to vote
1 reply
@arakov
Comment options

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@arakov
Comment options

Comment options

You must be logged in to vote
1 reply
@arakov
Comment options

Comment options

You must be logged in to vote
1 reply
@arakov
Comment options

Comment options

You must be logged in to vote
1 reply
@arakov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant