Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

If I dim an array, and don't know how many items I'm going to use how's the best approach? I know dimming something 1/2 way though the function will complete my task, and I also know it's frowned upon as sloppy.

 

I've included some sample code to get an idea of what i'm working with. Please advise thanks.

 

 

Dim nsPanel() As StatusBarPanel

Dim nsPanel1 As New StatusBarPanel

 

 

nsPanel1.AutoSize = StatusBarPanelAutoSize.Contents

 

nsPanel1.Text = "Goal Sales: 123"

nsPanel(0) = nsPanel1

www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
  • *Experts*
Posted

I myself like to use an ArrayList class to manage arrays or

collections. That way you can easily add, remove and reorder

items. If you wanted to add all the panels in the ArrayList

to a panel control using, say, StatusBar.Panels.AddRange(),

you could always create an array out of the ArrayList by using

ArrayList.ToArray().

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...