private void BeanTextBox_GotFocus(object sender, EventArgs e) { if (sender is TextBox textBox) { textBox.SelectAll(); } }