C#判断字符串中包含某个字符的个数 //定义字符串 var Email= "humakesdkj@idsk@"; //获取@字符出现的次数 int num = Regex.Matches(Email, "@").Count;