How I replaced if statements with a Dictionary delegate in C#

· Dev.to