开发者

error when i used unsafe keyword in asp.net c#

i used unsafe inside class but its not working. It gives error :

Unsafe code may only appear if compiling with /unsafe.

May i know how to use unsafe keyword in asp.net(visual studio 2008)开发者_如何学Go page.

Asp.net c#

Thank you.


Try adding /unsafe to the conditional compilation symbols under the Build tab in the project properties.


If you use "unsafe" keyword within your project you need to include /unsafe upon compilation. This tells the JIT compiler to compile the unsafe code and allow it to run.


In Visual Studio (2005 - 2010), on the Project Properties page, in the Build tab, there's a checkbox that says "Allow unsafe code". You need to check this, and then re-build your project.

error when i used unsafe keyword in asp.net c#

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜