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;
1
2012-07-26T12:00:30-0400
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!
Learn more about our help with Assignments:
C#
Comments
Leave a comment