Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am using the following code to store an array in.

 

Public Structure StructField

Public FieldName As String

Public FieldStartPos As Integer

Public FieldLength As Integer

End Structure

 

Public Fields(1) As StructField

 

I would like to delete a particular row in the array where the FieldName = Pants.

 

Is it possible to delete a row out of an array? If so how?

 

Thanks.

Posted

Could i combine the two in any way? To assign 'Fields' as a ArrayList to store the struct field in it?

 

Personally i would much prefer to use a standard array system, but i have been told it must use the structure in there.

 

Public Fields(1) As StructField

  • *Experts*
Posted
To insert things to an array list you can use Insert or InsertRange which can accept an array. Then to move it back to an array you use ToArray method of the ArrayList.
Posted
So are you saying that i create the array as i am now, then copy the array to an arraylist, delete the record from the arraylist and then copy the arraylist back to the standard array?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...