Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Jagged Arrays and Inverse
Message
De
03/01/2005 05:09:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
00973641
Message ID:
00973768
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform