Click here to Skip to main content
13,557,910 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 20 Jul 2011
Licenced CPOL

Naming Properties in MVVM

, 20 Jul 2011
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

You may also be interested in...

Comments and Discussions

GeneralRe: Unfortunatly not - I thought Substring(...) would cut the en... Pin
Doc Lobster21-Jul-11 19:52
memberDoc Lobster21-Jul-11 19:52 
GeneralAbout "it doesn't really remove maintenance concerns", you'r... Pin
Siavash Mortazavi22-Jul-11 17:26
memberSiavash Mortazavi22-Jul-11 17:26 
About "it doesn't really remove maintenance concerns", you're completely right Daniel Wink | ;)
It's not an ultimate solution, but maybe better than nothing Smile | :)
Thanks for posting linq expression tip.
GeneralMagic number (4) is account for the prefix "set " || "get "... Pin
Daniel Gidman21-Jul-11 3:44
memberDaniel Gidman21-Jul-11 3:44 
GeneralYou're right Doc ;) Thanks for your tip :) Pin
Siavash Mortazavi21-Jul-11 3:03
memberSiavash Mortazavi21-Jul-11 3:03 
GeneralAlso you would have to use a magic number (4) so you still h... Pin
Doc Lobster21-Jul-11 0:44
memberDoc Lobster21-Jul-11 0:44 
GeneralRe: You're right Doc ;) Thanks for your tip :) Pin
Siavash Mortazavi21-Jul-11 3:04
memberSiavash Mortazavi21-Jul-11 3:04 
GeneralHi, As you said, yourself, Reflection in to slow; maybe it's... Pin
Siavash Mortazavi20-Jul-11 18:08
memberSiavash Mortazavi20-Jul-11 18:08 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180515.1 | Last Updated 20 Jul 2011
Article Copyright 2011 by Daniel Gidman
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid