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#

Why does "using System;" work for shortcutting having to include System in Console.WriteLine but not System.Threading?

Using the System namespace allows Console.WriteLine to run without having to name the system namespace in the line but it throws an error if you try to leave it out of System.Threading.Thread.Sleep. How are these two method calls different that it won't allow that?

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Adam Couture! This might not be immediately obvious, but System and System.Threading are actually completely different namespaces. Threading is not a part of the System namespace. Rather the entire name System.Threading is a namespace in and of itself.

System namespace documentation

System.Threading namespace documentation

Hope this helps! :sparkles: