I have a collection of strings. For example,
string[] coll={\"1\", \"2\", \"3\" ...\"100\"...\"150\"...}
and I have respective methods for th
You can declare a dictionary with your keys and actions like
Dictionary actions = new Dictionary() { { "1", MethodOne }, { "2", ()=>Console.WriteLine("test") }, ............ };
and invoke it as
actions["1"]();
PS: Presuming method void MethodOne(){ } is declared somewhere.
void MethodOne(){ }