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 trial

C# C# Basics (Retired) Perfect Documentation

Bryan Carroll
Bryan Carroll
683 Points

When I searched System.Console class, I only saw 2 methods with "Write" in the name but the answer was 18 ?

Can you post the 18 methods with Write in the name or what constitutes the answer of 18? Thanks!

2 Answers

Steven Parker
Steven Parker
231,275 Points

You can count them for yourself in the documentation, but just from watching the Documentation video, you see about 15 of them scroll by starting at about the 2:15 time index while the instructor says "There are actually many methods named 'Write' in the console class. They all take different types of parameters."

... And that's enough to narrow the possible right answers down to just one. :wink:

Steven Parker
Steven Parker
231,275 Points

Based on what the instructor says in the video about the "different methods" that "take different types of parameters", and that he says this while scrolling through the overloads, it's clear that he's considering the overloads to be "different methods".

Bryan Carroll
Bryan Carroll
683 Points

That works for me. In terms of the actual class System.Console if it were a question on a test, I think the answer would be 1 or 2 depending on how it was worded but in the context of the lesson video, I can see how 18 would fit as the answer. Fair statement?

See this page from the Microsoft docs.

Bryan Carroll
Bryan Carroll
683 Points

Hi Kris, thanks for the reply. Just to clear up confusion. the question on the quiz is below.

How many different methods named Write are there in the System.Console class?

To me that meant, in the System.Console class, how many methods are there?
Looking at the link below on the left hand side, there is a dropdown under Console called Methods. In here 2 methods with "Write" in the name are listed.

https://docs.microsoft.com/en-us/dotnet/api/system.console?view=netframework-4.7.2

In the link you provided, (in the Write method) their are 18 "overloads". Are overloads considered methods?
I don't think I fully understand overloads but to me they look like options you have when using the method that method not an actual method.

Thanks for your time in replying!

Steven Parker
Steven Parker
231,275 Points

See the comment I added to my answer.