Я новичок в C#, может ли кто -нибудь помочь мне понять, почему мой код не работает?public virtual bool concatOnly()
{
int tmp = 0;
foreach (string word in words)
{
tmp += word.Length;
}
return (tmp
Я также не очень не понимаю, что мне нужно сделать в этом: < /p>
public virtual void removeRepeat()
{
IEnumerator iterator = words.GetEnumerator();
string checkWord = null;
while (iterator.MoveNext())
{
checkWord = iterator.Current;
foreach (string tmpWord in words)
{
if (tmpWord.Contains(checkWord) && checkWord.Length < tmpWord.Length)
{
iterator.Remove();
break;
}
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/301 ... d-in-array