Hi James Hackney,
Thank you for reaching out to the Microsoft Q&A forum.
It appears you might be experiencing an issue with how the code is being entered or executed in your development environment. Please follow these steps to troubleshoot:
1.Verify Your Development Environment: Ensure that you are using the correct development environment, such as Visual Studio or Visual Studio Code, and that it is properly configured for C# development.
2.Correct File and Code Placement: Make sure you are adding the code to the appropriate file (Program.cs) and in the correct location within the file. Code snippets provided in tutorials often need to be placed within specific methods or classes.
3.Build and Run the Application: After adding the code, attempt to build and run the application. In Visual Studio, this can be done by selecting Build > Build Solution and then running the application with Debug > Start Debugging.
4.Check for Errors: If there are any syntax or runtime errors, Visual Studio should highlight them. Look for any error messages or warnings in the Error List or Output windows.
5.Review the Documentation: Double-check the tutorial steps to ensure that no instructions or prerequisites have been missed.
Please feel free to contact us if you have any additional questions.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.
Thank you.