vbMarkO Posted September 23, 2005 Posted September 23, 2005 I need to know how to trim to size an array or to know how to put the array in an arraylist so I can trim it to size with myArrayList.TrimToSize OR Can you tell me how to get rid of an element that has nothing in it MyArr is showing 6 items when there is only 5 items in it, so when I went to debug it I found an element that is null like this 1 = 1 2 = 2 3 = 3 4 = 4 5 = 5 6 = "" <----------- I need to kill this element to uterly destroy to never see it again LOL But how oh great ones :) Sorry went off the deep end there for a sec My thought was if I put into an ArrayList then I could use the TrimToSize to settle it :) What do you think I should do vbMarkO Quote Visual Basic 2008 Express Edition!
*Experts* DiverDan Posted September 24, 2005 *Experts* Posted September 24, 2005 I'm going to ask what might be a stupid question, but why do you need to trim the array? For i = 0 to myArray.GetUpperBound(0) If Not myArray(i) = Nothing Then 'blah End If Next Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.