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 trialRay Thomas
12,478 PointsWhy doesn't Console.WriteLine work in my application?
using System;
namespace Treehouse.MediaLibrary { class Program { static void Main() { Album album1 = new Album("Wowzer Monger", "Weezer"); Book book1 = new Book("Read Between the Lines", "Stephen King");
Console.WriteLine($"Album Title: {album1.Title} \n Artist: {album1.Artist}");
Console.WriteLine("Title: " + book1.Title);
Console.WriteLine("test");
}
}
}
in the console....
treehouse:~/workspace$ msc *.cs treehouse:~/workspace$
no errors, yet doesn't execute.
At least Console.WriteLine("test"); should work
Thank you
1 Answer
shane anderson
2,651 PointsMake sure to include "using System;" for Console.WriteLine to work.
HIDAYATULLAH ARGHANDABI
21,058 PointsHIDAYATULLAH ARGHANDABI
21,058 PointsDear Ray Thomas
The code seems clean it should work why don't you restart your environment.