private void textBox_KeyDown(object sender, KeyEventArgs e) { var tmpBox = (TextBox)sender; if (tmpBox == null) { throw new ArgumentNullException(nameof(tmpBox)); } tmpBox.Text = e.KeyCode.ToString(); KeyBinding.SetKeyToNote_8(Array.IndexOf(keyBoxs, tmpBox) + 60, e.KeyCode); }