•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 425,936 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,595 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 15207 | Replies: 1
![]() |
•
•
Join Date: Jul 2004
Posts: 17
Reputation:
Rep Power: 5
Solved Threads: 0
I've got a situation where I have an array declared:
Later in my code, I have to pass the second rank by reference to a sub. This would be simple in a C-based language:
Not sure how many people understand that, but basically what I have to do is pass the second rank to the sub by reference. By referencing the compiler throws an exception because I'm using fewer indices than the array was declared to have. Does anyone know how to do this with VB.NET?
Dim limit(255, 31) As Integer ... DecodeTable(limit(index), ... )
Later in my code, I have to pass the second rank by reference to a sub. This would be simple in a C-based language:
int limit[255][31];
...
DecodeTable( limit[ index ], ... );limit(index)
•
•
Join Date: Jul 2004
Posts: 17
Reputation:
Rep Power: 5
Solved Threads: 0
I think I've found my answer. It appears that you can declare arrays in VB.NET the same as you can in C-based languages (jagged-style)
can also be declared as
and so referencing only
is legal 
Appreciate your interest anyway.
Dim limit(255, 31) As Integer
Dim limit(255)(31) As Integer
limit(index)

Appreciate your interest anyway.
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Passing multi-dimensional array (C)
- Multi-dimensional Arrays: (Python)
- 3d to 1d Array Conversion (C++)
- multi dimensional array search xml parser (PHP)
- Need help passing a multi-dimensional array (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Adding a record from a table to another
- Next Thread: deactivating all windows except current window


Linear Mode