Solved

- Array Help Needed -

Posted on 2004-08-24
2
185 Views
Last Modified: 2010-04-23
i am useing VB.NET, and i am working within a windows form.

how can i delete an item in an array?
i know how to clear it, but i would like to remove that item so that all of the items following it will move up one position.

can this be done without having to write code to copy the next item and paste it up one position, and having to repeat that for each item in the array that follows the deleted item. my array is very large so i would like to avoid doing that.

thanks.
0
Comment
Question by:moe10
2 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 77 total points
ID: 11878626
You can't do that in an (in an easy way ) array use an arraylist instead, like this

        Dim g As New ArrayList
        g.Add("test1")
        g.Add("test2")
        g.Remove("test1")
        MsgBox(g.Item(0))
0
 
LVL 8

Expert Comment

by:wguerram
ID: 11904684
What type of data are you using in your array?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now