The @ prefix turns off the processing of escape characters. : At « Language Basics « C# / C Sharp






The @ prefix turns off the processing of escape characters.

 
using System;
using System.Text;

class StringApp {
    static void Main(string[] args) {
        string finalString = @"\n\tString file: 'C:\MyApp\Strings'";
        Console.WriteLine(finalString);

    }
}

 








Related examples in the same category

1.Demonstrate an @ identierDemonstrate an @ identier
2.White space is preserved with verbatim strings.