-
July 24th, 2014, 10:01 PM
#1
Simple question on updating List items
I'm trying to find a simple way to update the items in a list. When using For...Each the items do not actually get updated. See the following code...
Private Structure test
Dim iNum As Integer
Dim strStr As String
End Structure
Private oTest As New List(Of test)
Dim newTest = New test
newTest.iNum = 1
newTest.strStr = "a"
oTest.Add(newTest)
For Each testItem As test In oTest
testItem.iNum = 2
Next
The list hasn't updated at this point. How can the list be modified?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|