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 C# Syntax Hello, World!

In the Main method, call the System.Console.WriteLine method and have it print the string "Hello!". Having an issue

Having an issue with this one

class Program
    static void Main(string[] args)


1 Answer

Steven Parker
Steven Parker
229,005 Points

When you submit this code, you'll see this result:

Bummer: We got a "; expected" error, which could mean a couple different things. It might mean you didn't end your statement in a semicolon. But it could also mean you didn't put parentheses after System.Console.WriteLine.

In this case, both issues are present. To call a method, you need both the method name and a pair of parentheses following it. Inside the parentheses you put any argument(s) you wish to pass to the method (here that would be the string to be printed). And of course, all statements should end with a semicolon.