Hi Pram,
The key difference between structs, which are value types, and Classes,
which are reference types, is how they are allocated in memory. A struct
is allocated directly on the stack and a Class is allocated on the run-time
heap. This distinction allows them to be used in different ways and
perhaps most importantly it allows the runtime to treat them in different
ways. For a good discussion of this, check out the following MSDN page:
ms-help://MS.MSDNQTR.2003FEB.1033/vbls7/html/vblrfVBSpec6_1.htm
or if you do not have MSDN, you can check it out on the web at:
http://msdn.microsoft.com/library/de...us/vbls7/html/
vblrfvbspec6_1.asp
Another good (and more thorough) explanation:
http://www.yoda.arachsys.com/csharp/memory.html
Let me know if you still have any questions about this.
Jeff.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.