DataTable Lambda式


   :
var localDt = new DataTable();
//     
var keyword=string.Empty;

1:     
var list = localDt.AsEnumerable().Select(x => x["****"].ToString()).ToList();
2:      
var list = localDt.AsEnumerable().Select(x => new      {
                id="",
                name=""
            }).ToList()


3:    
var rows = localDt.AsEnumerable().Select(string.Format("****='{0}'", keyword));

4:    
var data=new List();
localDt.AsEnumerable().Where(x => data.Contains(x["GUID"].ToString())).AsDataView();
localDt.AsEnumerable().Where(x => x["GUID"].ToString().Contains(keyword)).AsDataView();