c# - Datatable group by issue r.Field<T> -


i searching datatable group option , found solution in stackoverflow.

datatable t = // var groups = t.asenumerable()     .groupby(r => r.field<t>("columnname")) 

what mean... r.field<t>. why field<t>?
can't here specify r.field<customer>.

read http://blogs.msdn.com/b/adonet/archive/2007/02/05/type-safety-linq-to-datasets-part-2.aspx

edited:

1) why field?

field<t> method : datatable not typed one,the values saved object. field method returns value of column generic type parameter, enable type checking.

if typed datatable can field<customer.id>

    -

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -