CSharp
🛠️ Setup
- Install C# Extension for VS Code
- Check if .NET SDK is installed using the command
dotnet --version
in terminal. Install .NET SDK, if not already installed. - To create new .NET console project from VSCode, use
dotnet new console
command in the terminal. To see list of available templates, use the commanddotnet new list
C# VS Code Extensions
Run
- To run the code, use the command
dotnet run
in the terminal. Or use F5 or Ctrl + F5. - If you are trying to run a webservice and getting error with htttps, run the command
dotnet dev-certs https --trust
for the computer to prompt if you want to trust the dev certificate. Confirm the choice. - If you are running into any issues like the webapi service not showing up properly in browser, try the command
dotnet watch run
.
Learning
- Foundational C# by FreeCodeCamp
- Microsoft Learn - Get Started with C#
- Microsoft Learn - Build .NET Web API with C#
- Microsoft Learn - Build Web Apps with Blazor
Design Patterns
Coding Standards
C# Coding Standards and Best Practices by DoFactory