CompilationRelaxations 枚举

定义

指定一些参数,这些参数控制由公共语言运行时的实时 (JIT) 编译器生成的代码的严格性。

此枚举支持其成员值的按位组合。

C#
[System.Flags]
public enum CompilationRelaxations
C#
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum CompilationRelaxations
继承
CompilationRelaxations
属性

字段

名称 说明
NoStringInterning 8

将程序集标记为不需要字符串暂留。 在应用程序域中,常用语言运行时会为每个唯一字符串字面量创建一个字符串对象,而不是创建多个副本。 此行为名为字符串暂存,它在内部要求构建会占用内存资源的辅助表。

注解

CompilationRelaxations 枚举与 属性一起使用 CompilationRelaxationsAttribute

适用于

产品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1