In IL, you can define local variables using the .locals directive. Where are these variables stored, stack or heap?
.locals
If the object is not a value type, it is allocated on the heap and a reference to it is stored on the stack. Otherwise, it is directly allocated on the stack.