By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,661 Members | 779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,661 IT Pros & Developers. It's quick & easy.

Reflection, Fields, and Delegates

P: 81
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 "PropertyChangedEventHandler", because I am using INotifyPropertyChanged.


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.ComponentModel.PropertyChangedEventHandler states that it is a delegate.

Basically I do not want the delegates to get through.

Thanks!
Feb 18 '09 #1
Share this Question
Share on Google+
1 Reply


P: 81
Problem Solved!

[field:NonSerialized]
public event PropertyChangedEventHandler PropertyChanged;

does the trick.
Feb 18 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.