Solved

- Array Help Needed -

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

713 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