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 Strings Escape Sequences

Help me with this C# challenge

Define a Quote method that accepts a string parameter.It should return that same string, but surrounded by double quotes

Program.cs
using System;

class Program
{

    // YOUR CODE HERE: Define a Quote method!
    static string Quote(string accept)
    { string accept = ("\"Patrick, I don't think wumbo is a real word \""); 
        return accept;
    }

    static void Main(string[] args)
    {
       Quote("\"Patrick, I don't think wumbo is a real word \"");
    }

}

In your quote method, you need to do something along these lines (google the right replacement for the double quotes & read up on string concat)

string answer = "" + accept + "" return answer;

Hope that helps

1 Answer

Thank you Simao it helped.