DEV Community

loading...

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

Collapse
tyrrrz profile image
Alexey Golub Author

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.