int counter = 0;
string lastTwo = str.Substring(str.Length-2, 2);
string currentTwoChar = null;
for (int i = 0; i < str.Length; i++) //why is i unreachable?
{
currentTwoChar = str.Substring(i, 2);
if (currentTwoChar == lastTwo)
{
counter++;
}
return counter;
}
我必須錯過一些明顯的東西,而且這是深夜,但爲什麼我無法訪問?我不明白/ *我* /無法訪問?
就在我面前,我無法看到它!謝謝! – Jay
它有時會發生:) –