?
Solved

SortedList collection iteration

Posted on 2003-03-31
4
Medium Priority
?
263 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:bLUE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
bLUE earned 0 total points
ID: 8237375
Worked it out eventually..

        Dim document As CDocument

        For Each document In objDocuments.Values
            ListBox1.Items.Add(document.Title)
        Next
0
 
LVL 2

Expert Comment

by:rendlert07
ID: 8248111
you should be able to just say

Dim document As CDocument

       For Each document In objDocuments
           ListBox1.Items.Add(document.Title)
       Next
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9725722
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
0

Featured Post

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question