DEV Community

Discussion on: Interview question: heap vs stack (C#)

Collapse
 
tyrrrz profile image
Oleksii Holub

There are no "global" variables in C#, as everything is part of some class (or struct). But if it's a field in a class then it's most likely going to be on the heap.