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.
 
Back
Top