C
C#4w ago
Maniagovei

✅ // See https://aka.ms/new-console-template for more information// This is another comment line//

why is this not working
5 Replies
Maniagovei
ManiagoveiOP4w ago
// See https://aka.ms/new-console-template for more information // This is another comment line // Declare a (string) variable string myFriendsName; // assign a value to the myFriendsName variable myFriendsName = "Jannick"; // use/access the variable Console.WriteLine(myFriendsName); Console.ReadKey();
C# console app template changes in .NET 6+ - .NET
The .NET 6+ project template for C# console apps uses top-level statements. Understand what changed and how to use existing learning materials with the new syntax.
Maniagovei
ManiagoveiOP4w ago
thsi this code
Buddy
Buddy4w ago
What specifically doesn't work? $details
MODiX
MODiX4w ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code! (see $code for more information on how to paste your code)
Buddy
Buddy4w ago
And do you get any errors?

Did you find this page helpful?