private void Button_Click_1(object sender, RoutedEventArgs e) { SpiderNames myspiders; string userInputTextBox = ""; if (Enum.TryParse<SpiderNames>(userInputTextBox, true, out myspiders)); { switch (myspiders) { case SpiderNames.Violen: string Violen = File.ReadAllText(@"C:\Users\Documents\Violen.txt"); outPutTextBox.Text = Violen; break; case SpiderNames.Sacspider: string Sacspider = File.ReadAllText(@"C:\Users\Documents\Sacspider.txt"); outPutTextBox.Text = Sacspider; break; case SpiderNames.Daddylonglegs: break; default: break;
userInputTextBox
userInputTextBox = yourTextBox.Text;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)