By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,061 Members | 1,539 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,061 IT Pros & Developers. It's quick & easy.

Syntax for multi-dimensional arrays?

P: n/a
Hi,

I'm trying to create a multi-dimensional (2) array of CheckBox in VB.NET.
Can't figure out the syntax... can anyone help?

Thanks!

here's my code:
Private _columns(,) As CheckBox
....
_columns(DaysCount, PeriodCount) = New CheckBox()
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Carl Mercier" <carl@carl_nospam_please-mercier.com> schrieb:
I'm trying to create a multi-dimensional (2) array of CheckBox in VB.NET.
Can't figure out the syntax... can anyone help?
[...]
Private _columns(,) As CheckBox
...
_columns(DaysCount, PeriodCount) = New CheckBox()


You'll have to either specify the number of elements in the array in the
variable declaration or in a 'ReDim'. Then you can populate the array
elements with instances of 'CheckBox' by iterating over the array elements
using nested loops.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.