collections
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| collections [2018/02/04 18:42] – wolfgangriedmann | collections [2018/02/05 05:20] (current) – wolfgangriedmann | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| * [[https:// | * [[https:// | ||
| - | But it is very important | + | There are a few very important |
| + | * They are not arrays, and therefore they are **0-based**, | ||
| + | * You **cannot** change a collection while you are using it in a '' | ||
| + | * most collections are using generics, to you need to specify the type(s) of the elements in the declaration of the variable | ||
| + | |||
| + | A few code samples (please look at samples for the single classes [[collections: | ||
| + | < | ||
| + | local oList as List< | ||
| + | local nCount as int | ||
| + | |||
| + | oList := List< | ||
| + | oList:Add( "Hi girls" ) | ||
| + | oList:Add( "Hi guys" ) | ||
| + | nCount := oList: | ||
| + | foreach cItem as string in oList | ||
| + | // do something | ||
| + | next | ||
| + | oList: | ||
| + | oList: | ||
| + | < | ||
| + | local nCount as int | ||
| + | |||
| + | oDictionary := Dictionary< | ||
| + | oDictionary: | ||
| + | oDictionary: | ||
| + | foreach oItem as KeyValuePair< | ||
| + | // do something | ||
| + | next</ | ||
| + | |||
| + | |||
| + | |||
| + | |||
collections.1517769761.txt.gz · Last modified: 2018/02/04 18:42 by wolfgangriedmann