Created
April 28, 2012 21:19
-
-
Save einarwh/2522103 to your computer and use it in GitHub Desktop.
Dependent properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private DateTime _birthDate; | |
public DateTime BirthDate | |
{ | |
get { return _birthDate; } | |
set { _birthDate = value; } | |
} | |
[Viewable] | |
public int Age | |
{ | |
get { return DateTime.Now.Years - BirthDate.Years; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment