Created
April 16, 2013 09:09
-
-
Save rarous/5394524 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // before | |
| var bdayEl = el.Descendant("DatumNarozeni"); | |
| var birthday = bdayEl != null ? (DateTime?)Convert.ToDateTime(bdayEl.Value) : null; | |
| // after Maybe | |
| var birthday = from bday in el.Descendant("DatumNarozeni").ToMaybe() | |
| select Convert.ToDateTime(bday.Value).ToMaybe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment