linq - Iterate data in anonymous variable -


i have datatable containing data, , going fetch data using linq datatable.

the query looks this:

var requireddata=dt.asenumerable()   .where(row => row.field<byte>("id") == 1)   .select(x=> {     id = x.field<int>("id"),     yyyyy = x.field<string>("columnname2"),     zzzzz = x.field<string>("columnname3")   } ); 

now, please how iterate-through "requireddata"?

you use foreach loop:

foreach (var item in requireddata) {     // todo: use item.id, item.yyyyy , item.zzzzz here } 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -