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 (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
231,060 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
231,060 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
231,060 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.