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

后端 未结 7 960
清歌不尽
清歌不尽 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:38

    http://msdn.microsoft.com/en-us/library/cx9s2sy4.aspx

    this keyword is used to work with unsafe memory manipulation. By using it, you have ability to use pointer (a powerful and painful feature in C/C++)

提交回复
热议问题