J
Jeff Haumesser
I have a Collection called Grooming. Each object in this collection contains
the property GroomingServices of type Collection.
I also have a Clone of this Groomings collection called GroomingsInit. The
sub-collection GroomingServices has also been cloned.
My question is:
Can I simply set Groomings = GroomingsInit? Will the sub-collection
also be set to that of the GroomingInit?
Example:
Below is a method in my clsGroomings class object.
Public Function Clone() as Object Implements ICloneable.Clone
dim GroomingsClone as new clsGroomings
dim GroomingClone as clsGrooming
For each objGrooming as clsGrooming in Me
GroomingClone = new clsGrooming
GroomingClone.BeginTime = objGrooming.BeginTime
GroomingClone.EndTime = objGrooming.EndTime
GroomingClone.objGroomingServices = objGroomingServices.Clone
GroomingsClone.Add(GroomingClone)
Next
Return GroomingsClone
End Sub
NOTE: The objGroomingServices has it's own Clone method similar to the one
above.
Thankyou for any input.
Jeff
the property GroomingServices of type Collection.
I also have a Clone of this Groomings collection called GroomingsInit. The
sub-collection GroomingServices has also been cloned.
My question is:
Can I simply set Groomings = GroomingsInit? Will the sub-collection
also be set to that of the GroomingInit?
Example:
Below is a method in my clsGroomings class object.
Public Function Clone() as Object Implements ICloneable.Clone
dim GroomingsClone as new clsGroomings
dim GroomingClone as clsGrooming
For each objGrooming as clsGrooming in Me
GroomingClone = new clsGrooming
GroomingClone.BeginTime = objGrooming.BeginTime
GroomingClone.EndTime = objGrooming.EndTime
GroomingClone.objGroomingServices = objGroomingServices.Clone
GroomingsClone.Add(GroomingClone)
Next
Return GroomingsClone
End Sub
NOTE: The objGroomingServices has it's own Clone method similar to the one
above.
Thankyou for any input.
Jeff