string array and collection

  • Thread starter Thread starter Yoshi
  • Start date Start date
Y

Yoshi

Thought...

I have a collection of objects. The object has a property called Name. I
want fill a string array with each object Name. What is the quickest or best
way to do this?

Do I have to loop thru the collection and add each name to the array?

TIA,

Y
 
Yoshi,

Yes, this would be the best way. You can decare an array the same size
as the number of items in the collection, and then populate each with the
name on the object.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top