Click here to Skip to main content
15,886,840 members
Home / Discussions / C#
   

C#

 
GeneralRe: OMG u did it!!! =) Pin
Big Daddy Farang11-Apr-12 10:03
Big Daddy Farang11-Apr-12 10:03 
QuestionDo u find c# descent? Pin
Mark Kruger11-Apr-12 5:13
Mark Kruger11-Apr-12 5:13 
AnswerRe: Do u find c# descent? Pin
BobJanova11-Apr-12 5:21
BobJanova11-Apr-12 5:21 
AnswerRe: Do u find c# descent? Pin
PIEBALDconsult11-Apr-12 5:41
mvePIEBALDconsult11-Apr-12 5:41 
GeneralRe: Do u find c# descent? Pin
Mark Kruger11-Apr-12 6:13
Mark Kruger11-Apr-12 6:13 
AnswerRe: Do u find c# descent? Pin
Eddy Vluggen11-Apr-12 7:04
professionalEddy Vluggen11-Apr-12 7:04 
GeneralRe: Do u find c# descent? Pin
Mark Kruger11-Apr-12 7:38
Mark Kruger11-Apr-12 7:38 
GeneralRe: Do u find c# descent? Pin
BobJanova11-Apr-12 23:52
BobJanova11-Apr-12 23:52 
If you created the class you can provide a public Clone method which has an exactly specified interface and definition of its action.

If you are simply using an existing class, you can never know if MemberwiseClone will do what you want, because shallow copying private fields is dependent on the implementation of the class, and it is entirely legitimate for the class provider to update the private workings of the class in a way which will change how it operates.

For example, using a list: if the class you're using is simply a wrapper around an internal inner list class, you'll be getting essentially the same object after MemberwiseClone (and actions like Add will apply to both copies); if information is stored in fields of the class you're using, list modifying methods will (mostly) only apply to one copy. And you can't possibly tell which of those two it is going to be (you can use ILDASM or similar to find out what it is right now, but it might not be the same in the next release, or in the Compact Framework, or under Mono).
GeneralRe: Do u find c# descent? Pin
Mark Kruger12-Apr-12 1:29
Mark Kruger12-Apr-12 1:29 
AnswerRe: Do u find c# descent? Pin
V.11-Apr-12 21:04
professionalV.11-Apr-12 21:04 
Questionsolid edge programming Pin
issSTE11-Apr-12 3:48
issSTE11-Apr-12 3:48 
AnswerRe: solid edge programming Pin
Richard MacCutchan11-Apr-12 5:06
mveRichard MacCutchan11-Apr-12 5:06 
JokeRe: solid edge programming Pin
ZurdoDev11-Apr-12 8:34
professionalZurdoDev11-Apr-12 8:34 
JokeRe: solid edge programming Pin
Richard MacCutchan11-Apr-12 21:54
mveRichard MacCutchan11-Apr-12 21:54 
Questionfind solution for deadlock Pin
numeracy11-Apr-12 0:21
numeracy11-Apr-12 0:21 
AnswerRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 0:28
mvePete O'Hanlon11-Apr-12 0:28 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 0:34
numeracy11-Apr-12 0:34 
GeneralRe: find solution for deadlock Pin
Wes Aday11-Apr-12 0:45
professionalWes Aday11-Apr-12 0:45 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 0:47
numeracy11-Apr-12 0:47 
GeneralRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 0:51
mvePete O'Hanlon11-Apr-12 0:51 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 1:00
numeracy11-Apr-12 1:00 
GeneralRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 1:40
mvePete O'Hanlon11-Apr-12 1:40 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 1:05
numeracy11-Apr-12 1:05 
GeneralRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 1:06
mvePete O'Hanlon11-Apr-12 1:06 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 1:11
numeracy11-Apr-12 1:11 

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.