Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJericoe States
3,262 PointsUsing the provided link I couldn't determine correct answer?
Was I expected the read that whole link? its a lot of informatics to read through just to see whether the statement is static or not. Or maybe I just don't know where to look?
Is there an easier way to find the information I need or reading the full article is a must?
3 Answers
KRIS NIKOLAISEN
54,971 PointsIf you do a Find on AddDays it takes you to an entry under Methods with the following description
Returns a new DateTime that adds the specified number of days to the value of this instance.
If that is not enough information click on the AddDays link and see
public DateTime AddDays (double value);
and how it is used in the example
DateTime today = DateTime.Now;
DateTime answer = today.AddDays(36);
This indicates that AddDays() is an instance method.
Compare this to DaysInMonth
public static int DaysInMonth (int year, int month);
and how it is used in the example
int daysInJuly = System.DateTime.DaysInMonth(2001, July);
which indicates that DaysInMonth is a static method
KRIS NIKOLAISEN
54,971 PointsWhich question? Also you can use Find in your browser to quickly locate the method.
Jericoe States
3,262 PointsThe AddDays() method in System.DateTime is ____. Use the documentation available at
https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx to determine the correct answer.
There is a lot of information on that link! resembles wikipedia and its 10x as confusing. like what do I look at first?