If I assume your goal here is to come up with a way to call various methods using a selector argument:
using System;
using System.Collections.Generic;
namespace YourNameSpace
{
public static class TestClass
{
static TestClass()
{
IntToAction = new Dictionary<char, Action>
{
{'a', Journal1},
{'b', Journal2},
{'c', Journal3}
};
}
public static Dictionary<char, Action> IntToAction;
public static void Test(string[] args = null)
{
for (char theChar = 'a'; a < 'd'; a++)
{
IntToAction[theChar]();
}
}
public static void Journal1()
{
Console.WriteLine("a");
}
public static void Journal2()
{
Console.WriteLine("b");
}
public static void Journal3()
{
Console.WriteLine("c");
}
}
}
This example of "method dispatch" uses a Dictionary where the Key is Type 'char, and the Value is Type Action (with no parameters). Dictionaries in .NET provide very efficient look-up.
'Action is a type of Delegate that allows a more terse declarative syntax. See the solution here by C. Pallini for an example of using Delegates.