Search code examples
c#console.writeline

ASCII art causing unrecognized escape C#


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Diagnostics;

namespace ScriptingIProject02JordanOleksiuk
{
    class Program
    {
        static void Main( string[] args )

        {
            int QuizPoints = 0;

            Console.WriteLine("  __ _______    __  ___ _  _  _____                  _       ");
            Console.WriteLine("  \ \___ / / /\ \ \/   \ || |/ _  /___    /\  /\__ _| | ___  ");
            Console.WriteLine("   \ \|_ \ \/  \/ / /\ / || |\// // __|  / /_/ / _` | |/ _ \ ");
            Console.WriteLine("/\_/ /__) \  /\  / /_//|__   _/ //\__ \ / __  / (_| | | (_) |");
            Console.WriteLine("\___/____/ \/  \/___,'    |_|/____/___/ \/ /_/ \__,_|_|\___/ ");
            Console.WriteLine("                                                             ");
            Console.WriteLine("   __      _                                                   ");
            Console.WriteLine("  /__\_  _| |_ _ __ __ ___   ____ _  __ _  __ _ _ __  ______ _ ");
            Console.WriteLine(" /_\ \ \/ / __| '__/ _` \ \ / / _` |/ _` |/ _` | '_ \|_  / _` |");
            Console.WriteLine("//__  >  <| |_| | | (_| |\ V / (_| | (_| | (_| | | | |/ / (_| |");
            Console.WriteLine("\__/ /_/\_\\__|_|  \__,_| \_/ \__,_|\__, |\__,_|_| |_/___\__,_|");
        }
    }
}

I am trying to run a test of this program to get the ASCII art to work but I keep getting "Unrecognized escape sequence" in Visual studio signifying it's underneath many random characters. there doesn't seem to be a pattern to it not that I can identify. Some over them are identifying as 'class system.string represents text as a series of Unicode characters' I am a first year Video game design student. so my knowledge and understanding is very limited. Any assistance would be greatly appreciated.


Solution

  • prefix each of your quoted strings with @ that tells the compiler to take the string exactly as is.