In .NET, integer data type is a value type(stack) and String is a reference type(heap).
So If a class A has an integer, and a string type object in it, and a class B creates an object of class A, then how will this object of class A be stored in memory? In stack, or in a heap?
This was asked in my Microsoft interview. Need to understand how I fared.