J
Jon Skeet [C# MVP]
Bruce Wood said:OK... maybe I'm being a dunce, here. One of my half-dead C++ brain
cells just told me that this can be done with _any_ type: just declare
a variable as being of that type rather than a pointer to that type.
Exactly - that's where I was coming from when I suggested that C#
structs were like C++ classes in some ways. Of course, you can't derive
from a C# struct, so in that sense they're totally different

Regardless, one thing I'm sure of is that in C++ classes and structs
are essentially the same thing, just that structs are sort of
"class-lite".
Sort of. From what I remember, structs in C++ can't have methods, so
they don't have vtables etc.
This is absolutely not so in C#: structs act very
differently from classes, so much so that I would say that the C#
"struct" is a brand new beast that really doesn't have a parallel in
C++.
Agreed.