You might want to read up on this thread:
http://groups.google.com/groups?lr=&th=84f4322176f2d1f4
Basically, since a structure is a value type but the SetValue expects an
object, the SetValue is working on the boxed object rather than on the
structure itself. You should find a couple of solutions in the thread above
on how to work around this.
hope that helps..
Imran.
"Brent" <(E-Mail Removed)> wrote in message
news:BCD08621-52DB-4AF6-950D-(E-Mail Removed)...
> I have variables in a structure loaded into a list box.
> I thought I could use FieldInfo.SetValue to update the items value when
the
> user clicks on it, but it is not working.
>
> .
> .
> .
> Dim fi As Reflection.FieldInfo
> fi = tp.GetField(Item)
> MsgBox(fi.GetValue(InItems)) 'returns the original value
> fi.SetValue(InItems, Value.ToString) 'Nothing happens
> MsgBox(fi.GetValue(InItems)) 'still returns the original
value
> .
> .
> .
>
> Am I missing something or doing it wrong?
>
> Thanks
> Brent
>