How does CompilationRelaxations.NoStringInterning actually work?

前端 未结 3 711
渐次进展
渐次进展 2021-01-13 03:42

I am having problems demonstrating NoStringInterning

[assembly: System.Runtime.CompilerServices.CompilationRelaxations(System.Runtime.CompilerServices.Compil         


        
3条回答
  •  北海茫月
    2021-01-13 04:16

    The documentation states that the attribute:

    Marks an assembly as not requiring string-literal interning.

    In other words, it does not prevent the compiler from doing string interning, just providing a hint that it is not required. The documentation is a little bit sparse in this area, but this also seems to be the conclusion in this MSDN forum post.

提交回复
热议问题