Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
何千もの文字列を含む C# リストがあります。
"2324343" "6572332" "45122" ...
それらすべてを括弧で囲み、次のように置き換えたいと思います。
"(2324343)" "(6572332)" "(45122)" ...
forループを書いてこれを行う方法は知っていますが、できればLINQとLAMBDA式でそれを行う方法があるかどうか知りたいです。他の提案も受け付けています。
どうもありがとう!
var resultList = list.Select(x => string.Format("({0})", x)).ToList();