c# - Linq query how to select all columns -


I have a linq query that gives me the desired output: < New [] {c.Field & lt; string & gt; ("suburb"), c.Field & lt; string & gt; ("postcode") from var data = (dtskip.AsEnumerable (c) ), Field C. ("state"), sefield & lt; string & gt; ("id"), seafield & lt; string & gt; ("SEARCHKEY"), c. Field & lt; string & gt; ("RATING"), c.Field & lt; string & gt; delivery "}});

I c.field & lt Instead of giving names such as; string & gt; ("postcode"), how can I select all the columns . Only outputable output from my output:

  ["Darwin", "0800", "NT", "2", "Darwinant", "A", " Delivery Area ", [" Elaa "," 810 "," NT "," 5 "," Elvint "," A "," Delivery Area "], [" BRINKIN "," 0810 ","   

Any other way I can get the output from the dataset using data Linq query.

is a member of Detroit that gives the array as an array All the data in the row, the downside is that they are all returned in the form of the object s but if all your columns are the same type then you can put the line ItemArray Are the desired type (in this case string )

  dtskip.Rows.Cast & lt; DataRow & gt; () Select (R = & gt; r.ItemArray.Cast & lt; string & gt; ());   

This will give you the IEnumerable & lt; IEnumerable & lt; String & gt; & Gt; to work with.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -