locked
delete element from array RRS feed

  • Question

  • How to delete an element from array using vb.net.
    Sunday, January 4, 2009 1:47 PM

All replies

  •  Arrays have a fixed size, the most you can do is change its value.

    You may want to use something like System.Collections.Generic.List(of T) which is a wrapper around an array that does allow you insert/remove elements (by shifting values around and having a Count).

    Or allocate a new array with the new size and copy values from the original array into the new array, leaving out the values you don't want.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, January 7, 2009 11:39 PM