Does declaring a variable already occupy memory
问题 Hi I have been searching for the answer to this quite long. I want to know things under the hood regarding when memory will be taken up by my code. Ex. int myVar; Does this code already take up memory? by memory i mean the stack? and initially in .NET I have noticed that this line will have a default value of ZERO(0). But what does the variable really store? the value ZERO or an address to where the value ZERO(0) is stored? Also from what I understand about reference type is that when i write