String literals

image_pdfimage_print

   


using System;

public class EntryPoint
{
    static void Main( string[] args ) {
        string lit1 = "c:windowssystem32";
        string lit2 = @"c:windowssystem32";

        string lit3 = @"
line one
line two
";
        Console.WriteLine( lit3 );

        Console.WriteLine( "Object.RefEq(lit1, lit2): {0}",
                           Object.ReferenceEquals(lit1, lit2) );

    }
}

           
          


This entry was posted in Data Types. Bookmark the permalink.