----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: Swimmy Message 6 in Discussion Dear Tokmuni, Hopefully this explanation helps you to understand the difference between storing with stack and heap. .NET has 2 major variable types: 1. Value Type: Value type represents simple data storage located on stack. ie., When data is assigned to a value type the actual data is stored in the variable on the stack. Stack is comparitively small memory area in which data of fixed size is stored. eg., An integer or decimal value will need the same number of bytes to store their data, regardless of their actual value. This means that the location of such value can be efficiently determined. 2. Reference Type: Reference Type represent custom storage on Managed Heap. ie., When a data is assigned to a reference typeonly a reference is stored in the variable (stack) and the actual data is stored on the Managed Heap. Reference types donot have a fixed size. eg.,a string could vary in size from 2 bytes to close to all memory available on a system. The dynamic size of reference types means that the data they contain is stored on the heap rather than stack, however, the address of the reference type (ie., the location of the data on the heap) does have a fixed size, and so can be stored on the stack. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
