I have 10 different types of report which I want can generate.
Reports have id like 501,502,503...
Different report is generated by separate function, so instead of writing
if(reportId == 501){
generate report 501
}
if(reportId == 502){
generate report 502
}...
I thought about creating a dictionary where I bind int to a delegate. But it is a bad practise which is outlined in comments of the answer of the following question : Question
What do I do in my situation, where I get an integer and I have to find out which function to call?