Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# C# Basics (Retired) Perfect Variable Scope

Help needed.. :)

I simply don't understand what it means to put output with an empty thing.. anyone help?

Program.cs
using System;

namespace Treehouse.CodeChallenges
{
    class Program
    {
        static void Main()
        {            
            string input = Console.ReadLine();
            string output = Console.WriteLine();
            if (input == "quit")
            {
                string output = 
            }
            else
            {
                string output = 
            }

            Console.WriteLine(output);
        }
    }
}

1 Answer

Steven Parker
Steven Parker
220,925 Points

I think you meant "string", not "thing",

So to "Declare the output variable ,,,, and assign it to an empty string (i.e. "")." would look something like this:

                string output = "";

Thanks, man! but I tried that already, mind if you specify a different

Steven Parker
Steven Parker
220,925 Points

That's the correct answer to the question you asked, but it's not the only thing you need to do to complete the challenge.

Check the instructions again, and be sure to do everything in the "To fix this error" section, but also don't do anything else (like removing the strings being assigned, you'll need those back).

i still attempted using your advice and it is not working.. :(

hello????

sir,... i cant get passed this

Steven Parker
Steven Parker
220,925 Points

If you start over and follow the instructions carefully, then if you still have trouble you might try creating a new question so it will show the code with the suggestions applied.