對於奇怪的標題感到抱歉,我很難解釋它。我想是的人物在我的字符串這樣的比較:將數組中的字符串分解爲C中的字符#
stringa = new string[3];
for (int x = 0; x < stringa.GetLength(0); x++)
{
Console.WriteLine("String" + (x + 1) + ":");
stringa[x] = Console.ReadLine();
}
for(int x = 0;x < stringa.GetLength(0);x++)
{
Console.WriteLine(stringa[x]);
}
我想的是,現在我有stringa [X],我想那個字符串中的每個字符進行比較。有沒有什麼辦法可以做到這一點,而不使用任何臨時變量?
*我想比較該字符串內的每個字符*比較什麼? – McGarnagle
根據您發佈的代碼,您將獲得3個字符串的數組。你想要比較什麼? –
你想把它和它比較? –