C#: Benefit of explicitly stating “unsafe” / compiler option

前端 未结 9 1805
执笔经年
执笔经年 2021-01-12 09:13

I understand pointers and the rare need to use them in C# code. My question is: what is the reasoning behind having to explicitly state \"unsafe\" in a block of code. Additi

9条回答
  •  日久生厌
    2021-01-12 09:46

    So that it is immediately obvious which code won't run in web services without elevated permissions, etc.

提交回复
热议问题