Answer to Question #12385 in C# for marjan
how can i use arrays with select in linqs
var q ;
DataClasses1DataContext db = new DataClasses1DataContext();
q = from c in db.school1s select c;
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?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments: C#
Leave a comment