c# - collection copy behavior question -


in c#, after add object collection, if copy(deep copy) created?

no, if class, objects are, reference same object stored in collection.

if value type, int, double , structs copy made (not deep copy, if struct has reference class object in turn not copied).

edit:
deep copy objects first need create deep copy function.
have @ create deep copy in c# or how make deep copy in c# ?
can run deep copy method before adding items collection.

note
not need true deep copy. better rethink dataflow in application.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -