textbox 不让输入单引号

private void txtCode_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == Convert.ToChar("'"))
            {
                e.Handled = true;
            }        
        }

--

原文地址:https://www.cnblogs.com/runliuv/p/2604509.html