New answers tagged

2

Just a couple of thoughts FindBucketByKey and FindBucketByValue should be implemented as TryGetSomething because you already are doing this anyway internally and what is most important, it would save you from a ton of null-checks all over the place. Nobody likes them. Set should be called Initialize This one is funny: if (x == null) + throw means do not ...


1

(self-answer) The idea for not-using the constructor is indeed insane but... since it's possible I kept it in the new version too. I changed the name of this tool to DtoUpdater. It now can collect updates for multiple properties that at the end have to be Commited. Parameters are now matched with members not only by name but also by type and it picks the ...


7

You use IList<> where you should use ICollection<>. I've rarely encountered a scenario where IList<> actually needs to be used. The ICollection<> interface has most of the list's methods, but without everything related to indexing, which you don't use anyway. It's not that big of a deal, but I think it's good knowledge. When you ...


2

I'm not sure this qualifies as a review, but here we go anyways. Don't do this. This is one of the classic use of a design pattern where we shouldn't use one. A design pattern is a solution to a known problem with set boundaries and a very specific scenario. The builder is used to build complex objects in a flexible manner. A DTO isn't a complex object and ...


Top 50 recent answers are included