Hello veera,
Citing Jon
"Instance variables for a value type are stored in the same context as the
variable that declares the value type. The memory slot for the instance effectively
contains the slots for each field within the instance. That means that a
struct variable declared within a method will always be on the stack, whereas
a struct variable which is an instance field of a class will be on the heap.
"
Read this
http://www.yoda.arachsys.com/csharp/memory.html
vkWe know that value types are stored at stack are and reference types
vkare stored at heap area...
vk>
vkIf class is look like this..
vk>
vkclass Sample
vk{
vkint count;
vkdouble sal;
vk}
vkclass MainEntry
vk{
vkstatic void Main()
vk{
vkSample Obj=new Sample();
vk}
vk}
vkHere where the value types are stored in Sample class?
vk>
vkThanks,
vkVeera.
---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche