[Solved] Use of string as an existing variable in c#


You cannot do it for local variables like this. For member fields you can use reflection; for locals, the simplest approach is to use Dictionary, for example, like this:

IDictionary<string,string> vars = new Dictionary<string,string> {
    {"one", "find"}
,   {"two", "cancel"}
};

combobox1.text = vars["one"];

solved Use of string as an existing variable in c#