C#C
C#11mo ago
Faker

✅ How the "out" keyword works internally

Hello guys, sorry to disturb you all, I was just reading a bit about the
out
keyword. From what I have understood, the
out
keyword stores the "reference" of a variable tied to it. Any change method to that variable will reflect back when used later on.

I was wondering if someone can explain how the "out" keyword works internally related to what do we mean by "references", how are they stored in memory etc pls.

I have an overview of what happen, but I would really appreciate if someone can explain what's happening under the hood with the internal memory structure. (I think it's the same thing when we use the ref keyword, we modify addresses directly internally)
Was this page helpful?