I am encountering a problem which is how do I convert input strings like \"RED\" to the actual Color type Color.Red in C#. Is there a good way to do this?
Color.Red
The simplest way:
string input = null; Color color = Color.White; TextBoxText_Changed(object sender, EventsArgs e) { input = TextBox.Text; } Button_Click(object sender, EventsArgs e) { color = Color.FromName(input) }