• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

VB.NET - Remove an item from arrData() As DataRow

I create an array of DataRows through the following code
arrDistinctUnitList = dt.Select("Ranking = 2")

I have verified that the arrDistinctUnitList array is filled with the correct data as I intended it to be.  Now I'm wanting to loop through it and remove certain DataRows items from the array.

How would I remove an item from the array?
1 Solution
if you want to remove any item from the array you should make a shift from the deleted item to the last item; or make the value of the deleted item null; and when you select the item from the array check for the value if it is null or nut;

but i advice you to use the List; because you can remove the item easily by just calling the Remove method of the list.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now