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) Console I/O Namespaces

Sean Flanagan
Sean Flanagan
33,235 Points

Namespace.ClassName.MethodName

So if I've understood Jeremy correctly, you type in something like:

System.Console.Write();

My interpretation is:

Namespace.ClassName.MethodName(parameterType parameterName);

or for multiple parameters:

Namespace.ClassName.MethodName(Parameter1Type Parameter1Name, Parameter2Type Parameter2Name);

Am I right?

3 Answers

Looks good to me.

D O
D O
7,353 Points

Just to add - you can also have namespaces within namespaces and you can use aliases to shorten names and reduce typing. More info here: https://msdn.microsoft.com/en-us/library/dfb3cx8s.aspx

(Just I thought I would add this, since I found it interesting)

By namespaces within namespaces, you mean nested namespaces? It's great I can do that, but it would be better if this video mentioned it since the following 4 questions includes something like "What is the namespace here: Adobe.Illustrator.Class.Method" I was trying to answer "Adobe" or "Illustrator" but I didn't find out 'till some researching that the answer was "Adobe.Illustrator" D:

ANDY VAN DEN BOS
ANDY VAN DEN BOS
2,330 Points

Thank you Jonathan! wow I was stuck on that stupid question forever! I wish the video was a little bit more clear about the Nested NameSpaces.

I just typed in Adobe.Illustrator, but I wonder: on the page Jonathan mentions, it seems you have to define an alias to represent a namespace. In the quiz we don't see that an alias has been defined. Do we just assume it's an alias because there are 4 (instead of 3) words separated by periods?