使用不安全代码的含义是什么 [英] What are the implications of using unsafe code

查看:99
本文介绍了使用不安全代码的含义是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了代码本身可以直接访问内存的事实。使用 / unsafe编译器标志和 fixed关键字还有什么其他含义?是否有与我的.exe(我的应用程序仅在桌面上)的代码签名和部署相关的影响?

Aside from the fact that the code itself can access memory directly. What are the other implications of using the "/unsafe" compiler flag and the "fixed" keyword? Are there any knock on effects related to code signing and deployment of my .exe (my app is desktop only)?

(这与我是否应该为此,我的问题此处涵盖了为什么 >)

(This isn't about whether or not I should be doing this, the why is covered in my question here)

推荐答案

不安全的代码不可验证,因此您必须意识到这一点。在完全信任环境中,这没什么大不了的,但是如果您在其他环境中设置了更严格的权限,那么这可能会对您造成影响。

Unsafe code is not verifiable, so you have to be aware of that. In a Full Trust environment, that's not a big deal, but if you have other environments which have a more restricted permission set, then this might impact you there.

这篇关于使用不安全代码的含义是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆