- Course
C# 14 Best Practices
C# gives developers different ways to solve common coding problems, but it is not always obvious which approach is best. This course will teach you how to write clean, modern C# code using practical best practices your team can follow consistently.
- Course
C# 14 Best Practices
C# gives developers different ways to solve common coding problems, but it is not always obvious which approach is best. This course will teach you how to write clean, modern C# code using practical best practices your team can follow consistently.
Get started today
Access this course and other top-rated tech content with one of our business plans.
Try this course for free
Access this course and other top-rated tech content with one of our individual plans.
This course is included in the libraries shown below:
- Core Tech
What you'll learn
C# gives developers many ways to solve the same problem, and that freedom can slow teams down when standards are unclear. Naming style, project layout, null handling, control flow, dependency versions, and resource cleanup can all become repeated code review debates. In this course, C# 14 Best Practices, you’ll gain the ability to turn those debates into clear, enforceable team standards. First, you’ll explore how to apply C# naming conventions and configure .editorconfig so the team does not rely on memory or opinion. Next, you’ll discover how to organize solutions, projects, and namespaces around clear functional boundaries, using internal and public intentionally. Then, you’ll learn how to enable nullable reference types, read and resolve nullability warnings, and reduce NullReferenceException risk at compile time. After that, you’ll learn how to make logic easier to read by replacing nested control flow with guard clauses and replacing magic strings and numbers with constants or enums. Finally, you’ll learn how to manage NuGet package versions and implement IDisposable correctly when code owns unmanaged resources. When you’re finished with this course, you’ll have the skills and knowledge of C# 14 best practices needed to write code that is easier for a team to read, review, enforce, and safely maintain.