How to add double quotes to a string in C#

2 Answers

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    static class Program
    {
        static void Main()
        {
            string s = @"""C# Java Python""";

            Console.WriteLine(s);
        }
    }
}


/*
run:
  
"C# Java Python"
   
*/

 



answered Oct 14, 2018 by avibootz
0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    static class Program
    {
        static void Main()
        {
            string s = "\"C# Java Python\"";

            Console.WriteLine(s);
        }
    }
}


/*
run:
  
"C# Java Python"
   
*/

 



answered Oct 14, 2018 by avibootz

Related questions

1 answer 83 views
2 answers 257 views
2 answers 199 views
2 answers 129 views
1 answer 124 views
1 answer 118 views
...