✅ 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
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
Thanks will look into the libary and learn it.
PS : how do I close the post and mark it with : ✅ ?
😅
$close
If you have no further questions, please use /close to mark the forum thread as answered