User Name Password Register
DaniWeb IT Discussion Community
All
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 422,410 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 4,942 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: 554 | Replies: 2
Reply
Join Date: Sep 2007
Posts: 60
Reputation: evios is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
evios evios is offline Offline
Junior Poster in Training

Initializes 2 dimensional array

  #1  
May 27th, 2008
How can i actually initializes a 2-dimensional array ALL to 0?

Dim machinecount(,) As Integer

I try using 2 For loops to set it as 0 like the one shown but it gv me an error:

        For B = 0 To 23
            For C = 0 To 4
                machinecount(B, C) = 0
            Next
        Next

And i need to loop each argument to get a count....
for example....i want machinecount(1,2)++ ... something like this.....

can anyone help me? Thank You s much...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 453
Reputation: selvaganapathy is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 79
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Pro in Training

Re: Initializes 2 dimensional array

  #2  
May 28th, 2008
Hi
I think by default it has zero value
u can use like this
Dim machinecount(,) As Integer

.....
machinecount = New Integer(23,4) {}
KSG
Reply With Quote  
Join Date: Sep 2007
Posts: 60
Reputation: evios is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
evios evios is offline Offline
Junior Poster in Training

Re: Initializes 2 dimensional array

  #3  
May 28th, 2008
solved..thank You so much....reputation given...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 9:22 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC