I have defined a list of objects as List<NewLayerCounterMethod> NewLayer = new List<NewLayerCounterMethod>();
where each object within the class NewLayerCounterMethod
has four properties such as: VehicleType, VehicleCounter,Counter,Updating
.
The number of objects NewLayer
is 10 and I want to copy NewLayer[7]
into NewLayer[5]
such that if NewLayer[7]
is changed, NewLayer[5]
will not be changed.
Please note that I do not want to make a new object while I want to replace the properties of one object with those of another object which makes it somehow different from other questions on Stackoverflow and I think it is not a duplication.