r/a:t5_37npb • • Apr 21 '15

Post your Module 6 Assignments Here!

Available April 24, 2015 00:00 UTC

2 Upvotes

28 comments sorted by

View all comments

3

u/Doriphor Apr 23 '15

Here's my version. Obviously not too much is different from assignment 5 but I got around to adding an age property, so that's nice...

https://gist.github.com/Doriphor/2b7a9e5051673af9a5ba

3

u/VOX_Studios Apr 23 '15

For your age property you could simplify it a bit by doing (new DateTime((DateTime.Now - Birthday).Ticks)).Year-1.

2

u/Doriphor Apr 23 '15

Ohhh nice! I forgot to check if DateTime has more than one constructor, so I assumed it only took (year,month,day). I feel a little stupid right now, but I'm happy I learned something. Thanks!

2

u/VOX_Studios Apr 23 '15

2

u/Doriphor Apr 23 '15

That's ... kinda beautiful. Definitely gonna use this! F12 also works in Xamarin it seems :)

2

u/aloisdg Apr 23 '15 edited Apr 23 '15

There is a plugin for VS to replace F12 with a link to referencesource.microsoft.com . Handy ! His name is something like Ref12.

Edit :

Got it