A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
AFAIK, in C++, the only significant difference between a class and a struct is that the former defaults to private while the latter defaults to public. So don't think/talk about it too much, just pick one and go for it.
Wednesday, May 16, 2007
In C# structures are value types and are always created on the stack. So it looks like they're ment to be used as a simple structured primitive-like data types.
When you pass a structure as a method argument all it's content is copied and put on the stack.
With a large amount of methods that pass the structure variable as a parameter it can affect performance.
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz