Skip to main content
18 events
when toggle format what by license comment
Jan 13, 2018 at 18:02 answer added BlueMonkMN timeline score: 0
Jan 12, 2018 at 23:07 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Dec 13, 2017 at 22:53 answer added Scott Hannen timeline score: 0
Dec 13, 2017 at 22:28 comment added Scott Hannen Anything that ends up in a Dictionary<string, object> is a problem. That's the first thing that gets my attention. The nature of your data - selecting an implementation of something based on a country ID, means there is usually going to be something somewhere resembling a big switch statement. That's not so bad - it's just a question of where you put it and how to avoid duplicating it.
Dec 12, 2017 at 21:15 comment added Pieter Witvoet @t3chb0t: It's still there, at the bottom of the first snippet, just below the 'fold'.
Dec 12, 2017 at 19:28 comment added t3chb0t I'm 100% sure I saw it as the 3rd snippet just after you've posted the question.
Dec 12, 2017 at 19:23 comment added R4nc1d @t3chb0t, i am not sure what you mean that i removed a version with a dictionary? Code is still the same?
Dec 12, 2017 at 19:00 comment added t3chb0t @PieterWitvoet OP posted a dictionary in the first version but then removed it :-|
Dec 12, 2017 at 14:55 comment added Pieter Witvoet You can remove the whole switch-case statement if you store all input (employeeId, taxYearId, etc.) in a dictionary (using the same keys as found in TaxCountry.ReportParameters), and pass that on to CreateReport, which can then produce a dictionary with only the required keys.
Dec 12, 2017 at 14:54 answer added 200_success timeline score: 1
Dec 12, 2017 at 14:51 history edited 200_success CC BY-SA 3.0
edited tags; edited title
Dec 12, 2017 at 14:41 review Close votes
Dec 13, 2017 at 17:02
Dec 12, 2017 at 14:13 answer added Dimu Designs timeline score: 1
S Dec 12, 2017 at 12:36 history suggested kayess CC BY-SA 3.0
Text and code block fixage
Dec 12, 2017 at 12:10 review Suggested edits
S Dec 12, 2017 at 12:36
Dec 12, 2017 at 10:23 comment added R4nc1d @t3chb0t So I am busy rewriting an old vb.net application. the above code was my rewrite. (refactor). I can show the original but your eye might start bleeding.
Dec 12, 2017 at 10:11 comment added t3chb0t to show how the case will look - this sounds like it wasn't your actual code.
Dec 12, 2017 at 9:15 history asked R4nc1d CC BY-SA 3.0