Objects

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,
I would like to create multiple objects with the same procedure and give each one a different name, could someone help me with this?

Example TEST object = new TEST;

I want (object) to have a different name, which will be passed to it.
I would like to find that object by its name and update fields or delete it.

Thanks in advanced
 
You don't need a new name for each object. If you store the objects in an
array they will each get a "name" as ArrayList[x].

If you need to add your own name, one way could be to create a new struct
having a name and an object.

NewBie said:
Hello all,
I would like to create multiple objects with the same procedure
and give each one a different name, could someone help me with this?
 
Couple of reason I would like to create separate objects in memory is, I will create thread pool and multiple objects may be updating at the same time. I don’t know if can update multiple objects at the same time in an array list. The other thing is the program will get the name and then have to find that object to update properties. Will this work with you previous suggestion or do I have to implement something else

Thanks For Your Hel
 
Back
Top