We have constants defined in a static class along with functions like
public const string MSG_1 = "New error {0}"
public const string MSG_2 = "Random error occurred {1}"
public static string Message_ToForm(string MType, string[] vals)
public static GetNewType(string MType)
{
switch (MType)
{
case "MSG_1" : ...........
}
}
I require to call it from a program like Message_ToForm("MSG_1", string[]);
How can I convert it to get the value of the constant from string type? Basically, it should return me as "New error {0} when "MSG_1" is passed?