Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

Naming Properties in MVVM

, 20 Jul 2011
Rate this:
Please Sign up or sign in to vote.
PropertyChange...
PropertyChanged(this, new PropertyChangedEventArgs(MethodBase.GetCurrentMethod().Name.Substring(4)))

It is slower than your method, but it might not be a big issue and it is much easier to manage from a code perspective.

Not sure it is advisable, but definitely simpler.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Daniel Gidman
Architect Stackify
United States United States
No Biography provided
Follow on   Twitter   Google+

Comments and Discussions

 
GeneralRe: Unfortunatly not - I thought Substring(...) would cut the en... PinmemberDoc Lobster21-Jul-11 19:52 
GeneralAbout "it doesn't really remove maintenance concerns", you'r... PinmemberSiavash Mortazavi22-Jul-11 17:26 
GeneralMagic number (4) is account for the prefix "set " || "get "... PinmemberDaniel Gidman21-Jul-11 3:44 
GeneralYou're right Doc ;) Thanks for your tip :) PinmemberSiavash Mortazavi21-Jul-11 3:03 
GeneralAlso you would have to use a magic number (4) so you still h... PinmemberDoc Lobster21-Jul-11 0:44 
GeneralRe: You're right Doc ;) Thanks for your tip :) PinmemberSiavash Mortazavi21-Jul-11 3:04 
GeneralHi, As you said, yourself, Reflection in to slow; maybe it's... PinmemberSiavash Mortazavi20-Jul-11 18:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 20 Jul 2011
Article Copyright 2011 by Daniel Gidman
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid