Solved

- Array Help Needed -

Posted on 2004-08-24
2
190 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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, f…

910 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

19 Experts available now in Live!

Get 1:1 Help Now