 <p>have you thought of using method overloads instead? generally spoken i would try to avoid switch case blocks, with view exceptions, since they are often a smell that inheritance, overloads, etc. could solve the problem in a nicer way.</p> <p>BR</p>