悬赏园豆:5
[已关闭问题]
<P>在数组中没有问题</P>
<P> string[] names = { "tom" ,"toma", "tomb", "tomc"};<BR> var name = names.Where((n, i) => i % 2 == 0).Select(n => AppendString(n)); // 第二个参数i是数组的index<BR> foreach(string n in name)<BR> {<BR> TB_Content.Text = TB_Content.Text + n;<BR> }</P>
<P>在下面出现问题(T_project 是数据库中的表 )</P>
<P> var result = db.T_Project.result.Where((p, i) => i % 2 == 0)); foreach (T_Project p in result)</P>
<P>{TB_Content.Text = TB_Content.Text + p.ProjectName;}</P>
<P> </P>