Click here to Skip to main content
Click here to Skip to main content

Naming Properties in MVVM

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

About the Author

Daniel Gidman
Architect Stackify
United States United States
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralRe: Unfortunatly not - I thought Substring(...) would cut the en...memberDoc Lobster21 Jul '11 - 19:52 
GeneralAbout "it doesn't really remove maintenance concerns", you'r...memberSiavash Mortazavi22 Jul '11 - 17:26 
GeneralMagic number (4) is account for the prefix "set " || "get "...memberDaniel Gidman21 Jul '11 - 3:44 
GeneralYou're right Doc ;) Thanks for your tip :)memberSiavash Mortazavi21 Jul '11 - 3:03 
GeneralAlso you would have to use a magic number (4) so you still h...memberDoc Lobster21 Jul '11 - 0:44 
GeneralRe: You're right Doc ;) Thanks for your tip :)memberSiavash Mortazavi21 Jul '11 - 3:04 
You're right Doc Wink | ;)
Thanks for your tip Smile | :)
GeneralHi, As you said, yourself, Reflection in to slow; maybe it's...memberSiavash Mortazavi20 Jul '11 - 18:08 

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

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