dotnet / try

Try .NET provides developers and content authors with tools to create interactive experiences.
MIT License
2.89k stars 527 forks source link

Code issue in lesson - no output #1224

Open aidev13 opened 4 months ago

aidev13 commented 4 months ago

In Exercise - Combine strings using character escape sequences, you have us compare the code below: (this is copied and pasted)

Console.WriteLine("Generating invoices for customer \"Contoso Corp\" ...\n");
Console.WriteLine("Invoice: 1021\t\tComplete!");
Console.WriteLine("Invoice: 1022\t\tComplete!");
Console.WriteLine("\nOutput Directory:\t");
Console.Write(@"c:\invoices");

// To generate Japanese invoices:
// Nihon no seikyū-sho o seisei suru ni wa:
Console.Write("\n\n\u65e5\u672c\u306e\u8acb\u6c42\u66f8\u3092\u751f\u6210\u3059\u308b\u306b\u306f\uff1a\n\t");
// User command to run an application
Console.WriteLine(@"c:\invoices\app.exe -j");

The result of this code is "no output" because on line one the ellipsis is not separated from the \n newline character.

Please fix this so beginners are not confused.

aidev13 commented 4 months ago

Maybe it's not a bad code, but the .net editor doesn't like it.

jonsequitur commented 4 months ago

Could you please provide a link to the sample?

aidev13 commented 3 months ago

https://learn.microsoft.com/en-us/training/modules/csharp-basic-formatting/2-exercise-character-escape-sequences