J
Joanna Carter \(TeamB\)
Hi folks
I am trying to assign a Delegate to an Event using reflection.
I use FieldInfo.GetValue to supposedly get the field object, but casting the
result to the type of the field and assigning the Delegate does not catch
the event.
1. Does GetValue really return the *actual* object held in the field ?
2. Is there an easier way to assign a delegate in a containing class to an
event in the fields it contains ?
Joanna
I am trying to assign a Delegate to an Event using reflection.
I use FieldInfo.GetValue to supposedly get the field object, but casting the
result to the type of the field and assigning the Delegate does not catch
the event.
1. Does GetValue really return the *actual* object held in the field ?
2. Is there an easier way to assign a delegate in a containing class to an
event in the fields it contains ?
Joanna