What's the difference between a struct and a class?

I noticed that some entries in the API under "Runtime Classes" don't have "Class" as description, but "Struct".

So what’s the difference?

Thanks & Greetz, Ky.

There are many differences between structs and classes. Basically, structs are meant for lightweights objects or data grouping, and do not allow inheritance.

Here is a detailed comparison between structs and classes in C#


You can also check the official msdn documentation on structs data types, which I cannot post here due to the one link limitation for new users. Google "msdn struct" and you should find it.