C# C# Basics (Retired) Console I/O Say Hello!

Shawn Jass
Shawn Jass
7,151 Points

CodeChallenge Say Hello, what is the correct code. Why am I getting error asking what I have typed between the "" ?

Why am I getting an error asking what I have typed in between the parenthesis? And double quotes?

CodeChallenge.cs
class CodeChallenge
{
    static void Main()
    {
        // Prompt the user for Hello
        System.Console.Write("Hello: ");


    }
}

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 144,810 Points

Hey Shawn,

It's because you added way more than what the challenged asked for. The challenge simply asked to "Write the word "Hello" to the console in the code provided below." And I'm not sure why you have a colon and a space after "Hello"?

So, the answer is just one line of code:

System.Console.Write("Hello");

The trick is not to overthink the challenges. :)

:dizzy: