C# C# Basics Strings Escape Sequences

Rutendo Chaurura
Rutendo Chaurura
6,361 Points

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

Rutendo Chaurura
Rutendo Chaurura
6,361 Points

Thank you Simao it helped.