How to add single and double quotes to a string in C#

1 Answer

0 votes
using System;

public class Program
{
    public static void Main()
    {
        string str = "\"It's a nice option!\" Save us some time.";
        
        Console.WriteLine(str);
    }
}



/*
run:

"It's a nice option!" Save us some time.

*/

 



answered Mar 12, 2025 by avibootz

Related questions

1 answer 220 views
4 answers 392 views
1 answer 179 views
1 answer 211 views
1 answer 198 views
3 answers 486 views
...