Click here to Skip to main content
15,880,427 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Array of Double - Shallow vs. Deep Cloning? Pin
Eddy Vluggen5-Oct-12 12:25
professionalEddy Vluggen5-Oct-12 12:25 
GeneralRe: Array of Double - Shallow vs. Deep Cloning? Pin
M-Badger7-Oct-12 9:56
M-Badger7-Oct-12 9:56 
AnswerRe: Array of Double - Shallow vs. Deep Cloning? Pin
Eddy Vluggen8-Oct-12 0:39
professionalEddy Vluggen8-Oct-12 0:39 
GeneralRe: Array of Double - Shallow vs. Deep Cloning? Pin
M-Badger9-Oct-12 23:04
M-Badger9-Oct-12 23:04 
GeneralRe: Array of Double - Shallow vs. Deep Cloning? Pin
Eddy Vluggen10-Oct-12 1:22
professionalEddy Vluggen10-Oct-12 1:22 
GeneralOT Pin
M-Badger10-Oct-12 2:23
M-Badger10-Oct-12 2:23 
GeneralRe: OT Pin
Eddy Vluggen10-Oct-12 9:00
professionalEddy Vluggen10-Oct-12 9:00 
GeneralRe: Array of Double - Shallow vs. Deep Cloning? Pin
dojohansen10-Oct-12 5:36
dojohansen10-Oct-12 5:36 
As to whether that difference is *important*... well, that completely depends on what you do with them.

Say you have a User object and this involves the concept of a list of Favourites (products, girls, doesn't matter). It'd probably be a List<Favourite> rather than a Favourite[], but no matter. The point is if for some reason you wanted to let one user copy another user's favourites, what should you do? Just point to the same list? Or make an actual copy of the list? Surely you should copy it, that way if user A subsequently edits his copy, the other one is not affected.

What about the Product objects themselves? Well, there's no need to clone them unless they "belong" to the user. If they are shared, you could happily point to the same Products, and both users would see any changes to products they have in their respective lists.

--

I know this isn't the right forum for it, but I gotta ask: Are you really from Hell, Eddy? A lot of English speakers claim they're from Hell, but most of them don't even know where it is! Look up "Hell, Stjørdal, Norway" on Google Maps, and you won't be one of them. Wink | ;)
It depends. It *always* depends.

GeneralRe: Array of Double - Shallow vs. Deep Cloning? Pin
Eddy Vluggen10-Oct-12 9:09
professionalEddy Vluggen10-Oct-12 9:09 
QuestionSMS forwarding through GSM modem Pin
Member 94607155-Oct-12 2:57
Member 94607155-Oct-12 2:57 
QuestionHow to force rendering to generate an ID? Pin
AtALossHere5-Oct-12 1:13
AtALossHere5-Oct-12 1:13 
AnswerRe: How to force rendering to generate an ID? Pin
Sandeep Mewara5-Oct-12 2:24
mveSandeep Mewara5-Oct-12 2:24 
GeneralRe: How to force rendering to generate an ID? Pin
AtALossHere5-Oct-12 3:26
AtALossHere5-Oct-12 3:26 
GeneralRe: How to force rendering to generate an ID? Pin
Sandeep Mewara5-Oct-12 3:30
mveSandeep Mewara5-Oct-12 3:30 
GeneralRe: How to force rendering to generate an ID? Pin
AtALossHere5-Oct-12 4:51
AtALossHere5-Oct-12 4:51 
AnswerRe: How to force rendering to generate an ID? Pin
AtALossHere5-Oct-12 4:58
AtALossHere5-Oct-12 4:58 
QuestionCustom Class Exception Management / Setup Pin
M-Badger4-Oct-12 1:40
M-Badger4-Oct-12 1:40 
AnswerRe: Custom Class Exception Management / Setup Pin
Pete O'Hanlon4-Oct-12 1:50
mvePete O'Hanlon4-Oct-12 1:50 
GeneralRe: Custom Class Exception Management / Setup Pin
M-Badger4-Oct-12 2:27
M-Badger4-Oct-12 2:27 
GeneralRe: Custom Class Exception Management / Setup Pin
Pete O'Hanlon4-Oct-12 2:32
mvePete O'Hanlon4-Oct-12 2:32 
QuestionI need an idea for program Pin
Cihangir Giray Han3-Oct-12 22:02
Cihangir Giray Han3-Oct-12 22:02 
AnswerRe: I need an idea for program Pin
Pete O'Hanlon3-Oct-12 22:08
mvePete O'Hanlon3-Oct-12 22:08 
GeneralRe: I need an idea for program Pin
Cihangir Giray Han3-Oct-12 22:33
Cihangir Giray Han3-Oct-12 22:33 
GeneralRe: I need an idea for program Pin
Pete O'Hanlon3-Oct-12 22:39
mvePete O'Hanlon3-Oct-12 22:39 
GeneralRe: I need an idea for program Pin
Cihangir Giray Han4-Oct-12 1:47
Cihangir Giray Han4-Oct-12 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.