为什么我会收到此错误:
The name Regex does not exist in the current context.
来 self 的代码?
if (Regex.IsMatch(string1, @"^[a-zA-Z]+$"))
最佳答案
确保引用了 System.Text.RegularExpressions
命名空间。
关于c# - 为什么我的 C# 代码中出现 "The name Regex does not exist in the current context"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19171357/