These methods have always bothered me. Without delving into the code, I have no idea which key or auxiliary value is supposed to be used in this dictionary. I did it myself a thousand times, I'm sure. But it always bothered me, because there is not much information in it.
IDictionary<int,HashSet<int>> GetExportedCharges() { ... } void GetVisitStatuses(IDictionary<int,HashSet<int>> exportedCharges) { ... }
The presence of material in the dictionary makes sense, but all IDictionary methods have very abstract parameters. I assume that I can create a new class, implement IDictionary and rename all parameters. It just seems redundant. Makes a wish C # has a typdef directive.
How do you avoid returning dictionaries like this? Or do you avoid it at all?
TBone source share