取得字符串中是否重复字符
private bool isCan(string val)
{
bool result = true;
foreach(char s in val)
{
if (new Regex(s.ToString()).Matches(val).Count > 1)
{
result = false;
break;
}
}
return result;
}
{
bool result = true;
foreach(char s in val)
{
if (new Regex(s.ToString()).Matches(val).Count > 1)
{
result = false;
break;
}
}
return result;
}