//限制输入‘号的代码
            if (Regex.IsMatch(e.KeyChar.ToString(), "[']"))
            {
                e.Handled = true;
            }
           
需要使用using System.Text.RegularExpressions;的命名空间;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2021-11-29
猜你喜欢
  • 2021-11-28
  • 2021-07-28
  • 2021-07-10
  • 2022-02-03
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案