Click here to Skip to main content
11,412,182 members (64,492 online)
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

Naming Properties in MVVM

, 20 Jul 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
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.


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


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 20:52 
GeneralAbout "it doesn't really remove maintenance concerns", you'r... PinmemberSiavash Mortazavi22-Jul-11 18:26 
GeneralMagic number (4) is account for the prefix "set " || "get "... PinmemberDaniel Gidman21-Jul-11 4:44 
GeneralYou're right Doc ;) Thanks for your tip :) PinmemberSiavash Mortazavi21-Jul-11 4:03 
GeneralAlso you would have to use a magic number (4) so you still h... PinmemberDoc Lobster21-Jul-11 1:44 
GeneralRe: You're right Doc ;) Thanks for your tip :) PinmemberSiavash Mortazavi21-Jul-11 4:04 
GeneralHi, As you said, yourself, Reflection in to slow; maybe it's... PinmemberSiavash Mortazavi20-Jul-11 19: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 | Terms of Use | Mobile
Web03 | 2.8.150414.5 | Last Updated 20 Jul 2011
Article Copyright 2011 by Daniel Gidman
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid