Hello
I wanna knw d xact meaning of class n struct in .net?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 24, 2014, 3:25 PM
The difference between them is that classes represent reference types and structs represent value types.
A variable of a reference type contains a reference (a kind of pointer) to where an instance of that type resides in an area of memory known as the heap. If the variable doesn't currently refer to such an instance, it contains a null pointer.
In contrast a variable of a value type contains an actual instance of that type, not a pointer to where it's stored.