“不安全"这是一个错误吗 [英] "unsafe" is this one error
本文介绍了“不安全"这是一个错误吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
错误1:只有在使用/unsafe Program.cs进行编译时,才会出现不安全代码12 28 Project-244
公共不安全void Main()
Error 1 Unsafe code may only appear if compiling with /unsafe Program.cs 12 28 Project-244
public unsafe void Main()
推荐答案
转到项目属性,然后在配置属性"下,单击"build",然后将允许不安全代码"块更改为true.
好吧,如果需要,请在此处阅读有关如何使用不安全的更多信息:在C#中使用不安全代码 [ ^ ]
Go to your Project properties and under Configuration Properties, Click on build and then change Allow Unsafe Code blocks to true.
Well, if needed read more about how to use unsafe here: Using Unsafe Code in C#[^]
这篇关于“不安全"这是一个错误吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文