I am bit confused about it that where does the data members of a class are stored, in stack or heap.
If i have below code:
- class Test
- {
- int A = 0;
- }
I know value types stores in stack and reference types stores in heap, so class "Test" would store in Heap, but confused about "A".
Could anyone help me to understand this.

Sreekanth ReddyPosted Jan 9, 2019, 2:16 AM
Munish KumarPosted Jan 9, 2019, 1:19 AM
Sreekanth ReddyPosted Jan 8, 2019, 6:55 AM
Puneet KankarPosted Jan 7, 2019, 10:30 PM
Bryian TanPosted Jan 7, 2019, 4:23 PM