dotnetnube
Member
- Joined
- Aug 20, 2008
- Messages
- 8
- Programming Experience
- Beginner
I want to remove an item from an array completely...not just set it to "Nothing". Is this possible?
I have an array of files, that as I delete a file, I would like to remove the deleted file from the array:
Dim sourceDir As DirectoryInfo
Dim sourceFiles as FileInfo()
sourceDir = "\\path\folder\"
sourceFiles = sourceDir.GetFiles(fileName.Item("SourceName").ToString)
I am currently using this line of code to "remove" an item from the array:
array.clear(sourceFiles, item, 1)
The problem (for me) is that all this is doing is setting this sourceFiles item to "Nothing", but it isn't removing it from the array. How do I remove it from the array?
Thank you in advance!
I have an array of files, that as I delete a file, I would like to remove the deleted file from the array:
Dim sourceDir As DirectoryInfo
Dim sourceFiles as FileInfo()
sourceDir = "\\path\folder\"
sourceFiles = sourceDir.GetFiles(fileName.Item("SourceName").ToString)
I am currently using this line of code to "remove" an item from the array:
array.clear(sourceFiles, item, 1)
The problem (for me) is that all this is doing is setting this sourceFiles item to "Nothing", but it isn't removing it from the array. How do I remove it from the array?
Thank you in advance!