linq基础问题
private void button2_Click(object sender, EventArgs e)
{
string[] citys = { "juzi","mako","pingguo","aaa"};
IEnumerable<string> place = from city in citys where city.Length>2 select city;
this.dataGridView1.DataSource = dt;
}
就这个代码,同样的代码在web中可以显示, 但是在winform中无法显示, 难道winform中必须需要把他转化成datatable吗? 如果需要怎么转化? 能否不转化?