このような文字列strとして=「1,21,32,44,55」
直接コンマ+は文字列が決定され含まれている場合は、その後、例えば、「1」の問題があるでしょう、二つの方法があります
もし(strt.StartsWith(名+ " ")|| strt.Contains(" " +名+ " ")|| str.EndsWith(" " + 名)) { } ///////// ///////////////方式1 ////////////////////////////// 文字列[] listValues = strSplit(' ' )。 もし(listValues.Contains(名)) { } ////////////////////////方式2 ///////////// ///////////////////