When would I need to use the stackalloc keyword in C#?

后端 未结 7 950
清歌不尽
清歌不尽 2021-02-05 04:25

What functionality does the stackalloc keyword provide? When and Why would I want to use it?

7条回答
  •  独厮守ぢ
    2021-02-05 04:50

    Paul,

    As everyone here has said, that keyword directs the runtime to allocate on the stack rather than the heap. If you're interested in exactly what this means, check out this article.

提交回复
热议问题