부울을 반환하는 함수의 조건을 충족하는 값을 하나의 목록에서 제거하는 LINQ 식을 어떻게 만들 수 있습니까?LINQ 목록의 부울 함수 도움말
string[] message = "days of the week"
message.ToList().RemoveAll(c=>checkShortWord(c));
public static bool checkShortWord(string word) {
if ((word.Length > 3) &&
(!Regex.IsMatch(word, "^[0-9]+$")))
return true;
return false;
}
내 끝 문자열 배열은 지금해야합니다 :
message = {"days","week"}
나는 무엇을 변경해야합니까? 내 메시지 배열이 변경되지 않습니다.
아 .. 좋아 .. 나는 이것을 시도 할 것입니다. 감사 ! –