比较两个字符串中有多少位相同的代码 for (int i = 0, j = 0; i < Ans.Length ; i++, j++) { if (Ans[i] == msc[j]) score ++; else continue; }