Why use a Struct instead of a Class.

  • Thread starter Thread starter Paul Aspinall
  • Start date Start date
P

Paul Aspinall

Hi
I've used both Struct and Classes. However, after reading a few articles
lately, I'm starting to wonder why you would really use a Struct over a
class.

The only reason seems to be that Structs are Valuetypes, and can perform
better with smaller data types (ie < 16 bytes). But in the kind of apps I
write, this is very rarely a consideration, and therefore I prefer to use
classes all the time.

Am I alone in this??

Thanks


Paul
 
Back
Top