Primary constructors causing concern for C# developers

Опубликовано: 10 Октябрь 2024
на канале: Round The Code
2,879
55

Primary constructors is one of the new and exciting features to C# 12 which allows for parameters to be added to a class.

This can help reduce code bloat as we don't have to use a constructor to add parameters into a class.

However, there are concerns from C# developers as to whether they should be used as they are mutable in a class.

Watch our video where explain why developers have some doubts, when might the issue be resolved and whether you should start using them now.

🎥 Question answered at .NET conference 🎥
https://www.youtube.com/live/xEFO1sQ2...

📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...

👨‍💻Take our .NET and C# coding challenges👨‍💻
https://www.roundthecode.com/dotnet-c...

► More information:
https://www.roundthecode.com/dotnet-b...

🎥 Playlist 🎥
   • .NET 8 and C# 12 new features  

► Chapters
0:00 C# developers have concerns about primary constructors
0:13 Using primary constructors for dependency injection
0:55 Why is there a problem?
1:30 Question answered at .NET conference
2:14 Should you use primary constructors?
2:35 Learn about dependency injection

#csharp #csharpdotnet #csharpprogramming