User Tools

Site Tools


net_array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
net_array [2018/02/12 19:01] wolfgangriedmannnet_array [2018/05/31 03:50] wolfgangriedmann
Line 28: Line 28:
 endif endif
 return false</code> return false</code>
 +
 +There are two different types of multidimensional arrays with different syntax:
 +The jagged arrays or arrays of arrays:
 +<code>local aJagged as string[][]
 +
 +aJagged := <string[]>{ <string>{ "X#", "xsharp.info" }, <string>{ "C#", "microsoft.com" } }
 +System.Console.WriteLine( aJagged[0][0] )</code>
 +The jagged arrays are more efficient, but have a (for xBase users) strange syntax to access the members.
 +There are also multidimensional arrays:
 +<code>local aMulti as string[,]
 +
 +aMulti := string[,]{2,2}{ <string>{ "X#", "xsharp.info" }, <string>{ "C#", "microsoft.com" } }
 +System.Console.WriteLine( aMulti[0,0] )</code>
 +Of course you can use them also in more than 2 dimensions.
  
 In the daily coding the [[collections|Collections]] are much more important, because they can be resized. In the daily coding the [[collections|Collections]] are much more important, because they can be resized.
net_array.txt · Last modified: 2018/09/09 04:20 by wolfgangriedmann