NoStringInterningのデモンストレーションに問題があります
[assembly: System.Runtime.CompilerServices.CompilationRelaxations(System.Runtime.CompilerServices.CompilationRelaxations.NoStringInterning)]
class Program
{
static void Main(string[] args)
{
String s1 = "Friday";
String s2 = "Friday";
String s3 = "Friday";
String s4 = "Friday";
String s5 = "Friday";
String s6 = "Friday";
String s7 = "Friday";
String s8 = "Friday";
String s9 = "Friday";
// etc...
Console.WriteLine(Object.ReferenceEquals(s1, s2));
Console.WriteLine(Object.ReferenceEquals(s1, s3));
Console.WriteLine(Object.ReferenceEquals(s1, s4));
Console.WriteLine(Object.ReferenceEquals(s1, s5));
Console.WriteLine(Object.ReferenceEquals(s1, s6));
Console.WriteLine(Object.ReferenceEquals(s1, s7));
Console.WriteLine(Object.ReferenceEquals(s1, s8));
Console.WriteLine(Object.ReferenceEquals(s1, s9));
// etc...
.NET CLR 2、3、4を試してみました。出力として、取得するのはTrueの束だけです。私はたくさんのFalseを期待しています!