Delegates and Reflection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

can any one explain abt delegates with an example and how it is related with reflection

i.e i want to get the list of member variables of a class which is created runtim

With Regard
Magesh
 
Hi,

Reflection and delegates are not that closely related. In your example, I
think you won't need to touch delegates at all - you just need to get the
Type instance corresponding to the class instance and then start querying
the Type instance for member variables. Please refer to the following MSDN
topic:

"Type.GetFields Method (BindingFlags)"

It contains a code snippet you can modify and use in your code.
 
Back
Top