Executing a method which is named via a config file

Solution 1:

You could use reflection to reflect method names back and check them against the name passed from the property in the config file.

Like so

    Type magicType = Type.GetType("MagicClass");
    MethodInfo magicMethod = magicType.GetMethod("ItsMagic");
    object magicValue = magicMethod.Invoke(magicClassObject, new object[]{100});

That would work.. but to be honest, I'd go with a case statement as you'll be hardcoding the method names anyway (because they are code), and it'll be strongly typed (less chance of typos and errors).