不安全代码只会在使用/unsafe编译的情况下出现

选中项目 --> 属性 --> 勾选复选框 [允许不安全代码(W)] 然后保存. 图如下:

 

原文地址:https://www.cnblogs.com/mrtom/p/1968875.html