本文介绍了为什么我得到错误"不安全的代码只能出现如果与/不安全"编译;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么我收到以下错误?
Why do I get the following error?
不安全的代码只能出现如果与/不安全编译?
我在C#和Visual Studio 2008的工作在Windows&NBSP编程。CE
I work in C# and Visual Studio 2008 for programming on Windows CE.
推荐答案
要使用不安全的代码块,该项目必须与在/不安全的开关进行编译。
To use unsafe code blocks, the project has to be compiled with the /unsafe switch on.
打开项目的属性,去在构建
标签,检查允许不安全的代码
复选框。
Open the properties for the project, go to the Build
tab and check the Allow unsafe code
checkbox.
这篇关于为什么我得到错误"不安全的代码只能出现如果与/不安全"编译;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!