67 152
Assignments Done
99,4%
Successfully Done
In November 2018

Answer to Question #12385 in C# for marjan

Question #12385
how can i use arrays with select in linqs
var[] q ;
DataClasses1DataContext db = new DataClasses1DataContext();
q = from c in db.school1s select c;
Expert's answer
When you use a linq query it returns you an IEnumerable<Your class>. To get an array simply use linq extension method ToArray():




q =( from c in db.school1s select c).ToArray();

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions