Reflection, Fields, and Delegates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nelsonbrodyk
    New Member
    • Mar 2008
    • 81

    Reflection, Fields, and Delegates

    Hey All,
    I am trying to do something a little different, and am able to use Type.GetFields in order to get a list of fields that I want. However, one of the fields coming through is "PropertyChange dEventHandler", because I am using INotifyProperty Changed.


    What I am wondering is, when asking for all the fields via reflection, can I say "Do not give me delegates", as the definition for System.Componen tModel.Property ChangedEventHan dler states that it is a delegate.

    Basically I do not want the delegates to get through.

    Thanks!
  • nelsonbrodyk
    New Member
    • Mar 2008
    • 81

    #2
    Problem Solved!

    [field:NonSerial ized]
    public event PropertyChanged EventHandler PropertyChanged ;

    does the trick.

    Comment

    Working...