This is a console program to accept a string and print it with double inverted comma.
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace hello
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. Console.WriteLine("Enter a string");
  12. string str = Console.ReadLine();
  13. Program pbj = new Program();
  14. str = pbj.convertto_inverted(str);
  15. Console.WriteLine(str);
  16. Console.ReadKey();
  17. }
  18. public string convertto_inverted(string str)
  19. {
  20. string comma = "";
  21. comma = "\"" + str + "\"";
  22. return comma;
  23. }
  24. }
  25. }