C
C#4mo ago
Dankh917

✅ Improving my etiquette writing C#

Hello I'm trying to improve my etiquette in writing C# , my question is about validation logic, how popular is it to write a class using C# auto implemented properties and than after to make a class who validates the previous class, is this a common practice ? What are other common practices concerning this topic ? Thanks in advance
4 Replies
Angius
Angius4mo ago
Autoproperties are extremely common Public fields are discouraged, properties with a backing field when just an autoproperty works is just useless code And validator classes are usually how validation is done as well, yes Fluent Validations is one of the most popular validation libraries for a reason
Dankh917
Dankh917OP4mo ago
Thanks will look into the libary and learn it. PS : how do I close the post and mark it with : ✅ ? 😅
Angius
Angius4mo ago
$close
MODiX
MODiX4mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server