I am using Visual Studio 2005 and C# 2.0, and I am trying to split a comma-separated string using the string.Split
function and a lambda expression as follows:
string s = "a,b, b, c";
string[] values = s.Split(',').Select(sValue => sValue.Trim()).ToArray();
I get an error saying that the expression is not recognized -- how can I resolve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…