Link to home
Start Free TrialLog in
Avatar of bLUE
bLUE

asked on

SortedList collection iteration

I have an object objDocuments based on sortedList class. Each item of the objDocuments is of CDocument class.

I just need to know how to iterate through objDocuments to retrieve properties of CDocuments. I have the following code, but it doesnt recognise CDocument.Title and such. Any ideas or suggestions would be appreacaited:

Dim document As CDocument
Dim objEnm As IEnumerator = objDocuments.GetEnumerator()

While objEnm.MoveNext
            ListBox1.Items.Add(document.Title)
End While



Thanks
ASKER CERTIFIED SOLUTION
Avatar of bLUE
bLUE

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rendlert07
rendlert07

you should be able to just say

Dim document As CDocument

       For Each document In objDocuments
           ListBox1.Items.Add(document.Title)
       Next
Avatar of Bob Learned
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer