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
Simon Sporrong35,097 Points
Problem with adding the Content. Get a "unreachable code detected
I'm getting an error: "Cannot assign to 'Content' because it is a 'method group'." And also a warning: "Unreachable code detected". What am I doing wrong?
I should point out that i'm using a Mac with Visual Studio Community 2017, so the solution doesn't look exactly like the video. For example I have another Controller named HomeController wich was added for me when creating the project.
Grateful for any help!
public class ComicBookController : Controller
public ContentResult Detail()
return new ContentResult();
Content = "Hello from the comic book controller"