Click here to Skip to main content
15,868,016 members
Home / Discussions / C#
   

C#

 
QuestionStruct vs Class? PinPopular
David C# Hobbyist.16-Feb-14 12:34
professionalDavid C# Hobbyist.16-Feb-14 12:34 
AnswerRe: Struct vs Class? Pin
Peter Leow16-Feb-14 13:29
professionalPeter Leow16-Feb-14 13:29 
AnswerRe: Struct vs Class? PinPopular
OriginalGriff16-Feb-14 21:29
mveOriginalGriff16-Feb-14 21:29 
GeneralRe: Struct vs Class? Pin
Nicholas Marty16-Feb-14 21:55
professionalNicholas Marty16-Feb-14 21:55 
GeneralRe: Struct vs Class? Pin
harold aptroot16-Feb-14 22:02
harold aptroot16-Feb-14 22:02 
GeneralRe: Struct vs Class? Pin
OriginalGriff16-Feb-14 22:17
mveOriginalGriff16-Feb-14 22:17 
GeneralRe: Struct vs Class? Pin
OriginalGriff16-Feb-14 22:26
mveOriginalGriff16-Feb-14 22:26 
GeneralRe: Struct vs Class? Pin
harold aptroot16-Feb-14 22:59
harold aptroot16-Feb-14 22:59 
I disagree with this analysis on many levels.
Firstly, immutability is about semantics, not implementation, so showing some IL or even assembly doesn't show anything.
Secondly, the semantics of the "add" IL instruction are "pop two values, add them, push result". So if you want to treat stack slots as instances (and I disagree with that as well), the old ones are gone and you have a new one.
Thirdly, extending this sort of analysis to assembly gives absurd conclusions. For example, what happens in "add eax, 1"? Obviously one is added to "eax", but that doesn't mean that if "eax" had the value 0 first that you've just "changed the value of the 0-instance".
GeneralRe: Struct vs Class? Pin
OriginalGriff17-Feb-14 0:06
mveOriginalGriff17-Feb-14 0:06 
GeneralRe: Struct vs Class? Pin
harold aptroot17-Feb-14 0:16
harold aptroot17-Feb-14 0:16 
GeneralRe: Struct vs Class? Pin
jschell17-Feb-14 12:07
jschell17-Feb-14 12:07 
GeneralRe: Struct vs Class? Pin
BillWoodruff17-Feb-14 1:41
professionalBillWoodruff17-Feb-14 1:41 
AnswerStruct vs Class? (Off Topic) Pin
OriginalGriff17-Feb-14 0:41
mveOriginalGriff17-Feb-14 0:41 
GeneralRe: Struct vs Class? (Off Topic) Pin
David C# Hobbyist.17-Feb-14 11:12
professionalDavid C# Hobbyist.17-Feb-14 11:12 
GeneralRe: Struct vs Class? (Off Topic) Pin
OriginalGriff17-Feb-14 11:24
mveOriginalGriff17-Feb-14 11:24 
GeneralRe: Struct vs Class? (Off Topic) Pin
OriginalGriff23-Feb-14 0:29
mveOriginalGriff23-Feb-14 0:29 
GeneralRe: Struct vs Class? (Off Topic) Pin
David C# Hobbyist.23-Feb-14 4:42
professionalDavid C# Hobbyist.23-Feb-14 4:42 
GeneralRe: Struct vs Class? (Off Topic) Pin
OriginalGriff23-Feb-14 4:57
mveOriginalGriff23-Feb-14 4:57 
QuestionInterface for Authorization Custom Inteface c# Winforms .net 4.0 Pin
Member 1050351416-Feb-14 12:10
Member 1050351416-Feb-14 12:10 
AnswerRe: Interface for Authorization Custom Inteface c# Winforms .net 4.0 Pin
Eddy Vluggen17-Feb-14 0:29
professionalEddy Vluggen17-Feb-14 0:29 
QuestionStrange bug when converting from binary to decimal.. Pin
Alex Reed16-Feb-14 9:54
Alex Reed16-Feb-14 9:54 
AnswerRe: Strange bug when converting from binary to decimal.. Pin
Richard Andrew x6416-Feb-14 11:25
professionalRichard Andrew x6416-Feb-14 11:25 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Alex Reed17-Feb-14 14:01
Alex Reed17-Feb-14 14:01 
AnswerRe: Strange bug when converting from binary to decimal.. Pin
Richard MacCutchan16-Feb-14 22:40
mveRichard MacCutchan16-Feb-14 22:40 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Richard Deeming17-Feb-14 1:54
mveRichard Deeming17-Feb-14 1:54 

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.