Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Jagged Arrays and Inverse
Message
From
03/01/2005 05:09:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
00973641
Message ID:
00973768
Views:
15
>Thank you.
>
>>>Hello All,
>>>
>>>When Using a jagged Array it's handy to reference(?) a whole row of the array like
MyArray[0]
. My question is: is there also way to reference to the column without using a loop, I tried something like this:
MyArray[][0]
but get a build failure. So how could I reference the column?
>>>
>>>I was also thinking about inversing the array, is this possible?
>>>
>>>I hope I was clear,Thank you.
>>>
>>>Zakaria al Azhar.
>>
>>You need to loop.
>>Cetin

And I meant no. You need to reference it giving index of first array.
MyArray[0][0],MyArray[1][0]...

MyArray[0] works because a jagged array is an array whose elements are array.

Probably you want a multidimensional array and not a jagged array (according to benchmarks from MS jagged arrays are much slower).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform