Using unsafe code introduces security and stability risks.
使用不安全代码将引起安全风险和稳定性风险。
Unsafe code is required when you call native functions that require pointers.
当调用需要指针的本机函数时,需要使用不安全代码。
In the common language runtime (CLR), unsafe code is referred to as unverifiable code.
在公共语言运行时(CLR)中,不安全代码是指无法验证的代码。
In unsafe code, an object must be pinned before it can be referred to by an unmanaged pointer.
在不安全代码中,必须先将对象固定,然后非托管指针才可引用该对象。
This error arises in an unsafe code section that contains a fixed-size array declaration similar to a field declaration.
在包含与字段声明相似的固定大小的数组声明的不安全代码段中,会发生此错误。
If you use unsafe code, it is your responsibility to ensure that your code does not introduce security risks or pointer errors.
如果使用不安全代码,由您负责确保您的代码不会引起安全风险或指针错误。
Given that a safer (and possibly faster) idiom exists for this - map-reduce - there's no excuse for writing such unsafe code, even if it seems safe "in this case."
如果存在一种针对此情形的更安全(且可能更快)的语言风格(映射-减法),则没有借口编写这样的不安全代码,即使它“在此情形下”看起来是安全的。
The following example is provided for those very rare situations in which you may want to modify a string in-place by using unsafe code in a manner similar to C-style char arrays.
下面的示例针对的是一种非常罕见的情况,即您可能希望使用不安全代码以类似于C 样式字符数组的方式就地修改字符串。
People automatically associate it with endless lines of code, back-end technology, server rooms, computer science labs, and experimental (read: unsafe and buggy) technology.
人们会不由自主地将开源和无数行代码、后台技术、服务器机房、计算机实验室以及试验(理解为不安全、充斥着bug的)技术联系在一起。
If you call out this way to key-unsafe functions, the glue code recognizes the situation and takes care of it for you.
如果您按照这个方式调用键不安全的函数,那么粘合代码将能够识别具体的情况,并帮助您对其进行相应处理。
Code that makes common use of static fields or other means of caching data is unsafe for scopes because of the assignment rules, which can result in an IllegalAssignmentError.
由于分配规则的限制,通常使用静态字段或其他缓存数据方式的代码会使范围不安全,可能导致IllegalAssignmentError。
Methods, types, and code blocks can be defined as unsafe.
方法、类型和可被定义为不安全的代码块。
This is unsafe because of the difference in the default calling conventions between pure and native code (or mixed native and managed).
不安全的原因在于纯代码与本机代码(或混合本机代码与托管代码)之间的默认调用约定存在差异。
This is unsafe because of the difference in the default calling conventions between pure and native code (or mixed native and managed).
不安全的原因在于纯代码与本机代码(或混合本机代码与托管代码)之间的默认调用约定存在差异。
应用推荐