How do I delete an element from an array variable (not a data table)

Cant find any way to delete an element from an array variable.

1 Like

arrTest= arrTest.Except(New String() {"Element to Remove"}).ToArray()

arrTest= arrTest.Except(New Integer() {1111}).ToArray()

or

Convert array to list, remove the elements and convert back to array

6 Likes

Would you please show an example of how to convert array to list and remove a element? Iā€™m getting error when using MyList.RemoveAt(0), I want to remove first element of the list.

image

image

Hi vvaidya,

How to remove multiple empty or null elements from a array.

try this way

arr = arr.Where(Function(x) Not String.IsNullOrEmpty(x)).ToArray

2 Likes

Hi @vvaidya

Thank you for the help.

Regards,
Hari