By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,587 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

How to Index into

P: 1
The XLINQ query in VB9:
Expand|Select|Wrap|Line Numbers
  1.  Dim studentGrades = _
  2.     From r In grades _
  3.     Where r...<AssignedTo>.Value = sd.sID _
  4.     Order By r...<DateCompleted>.Value Ascending _
  5.     Select r...<AssignmentGrade>.Value, r...<DateCompleted>.Value
  6.  
returns a variable of type System.Collection.Generic.IEnumerable( Of <anonymous type>).

How do you index into such a Collection? You can Enumerate over the Collection with For Each. You can get the studentGrades.Count. But how do you easily get access to the Last value, for instance?

All help is appreciated.
Jan 25 '08 #1
Share this Question
Share on Google+
1 Reply


daniel aristidou
100+
P: 491
Not sure if this is what you want but try......
This returns the index of the first row containing the specified criteria
Expand|Select|Wrap|Line Numbers
  1.  Bindingsource.find= #Column= 'Specified')
  2. 'and
  3. Bindingsource.count
Jan 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.