I was reading into the nitty-gritty of structs in C# here: "C Fundamentals, The differences between struct and class." and at the very bottom it mentions keeping a struct below 16 bytes. I looked elsewhere and saw that it is commonly recommended, though it sounds like it's been bumped up a bit to 20-24 bytes here in later versions of .NET.
My question is, are they just adding up the ints, doubles, etc. to total the 16 bytes, or are they talking about the size after compile, and if so, wouldn't getters and setters add to that?
Aucun commentaire:
Enregistrer un commentaire