0

I have a byte array

Dim b() as byte = {1,2,3,4,5,6,7,8,9}

I want delete without for next 3., 6., 9. items and so on

Dim Newb() as byte = {1,2,4,5,7,8}

How can i do?

1
  • Tag this with the appropriate language, might get more help Commented Sep 13, 2015 at 11:52

1 Answer 1

4

Built-in .NET arrays do not allow deletions. You have several options open to you:

  • Use List(Of Byte()) collection.
  • Make a new array of the correct size, and copy only the data that you need into it.
  • Use LINQ API to filter the data from your array. The data would remain there, but the code that uses that data would not "see" it
  • Use LINQ API to filter the data from your array, and call ToArray to make a new array from the results.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.