为什么要驻留通过构造函数和 char[] 创建的字符串?

Why a string is interned that is created via constructor and with a char[]?

我确定这会输出 false,但是 actually 它输出 true:

string foo = new string("foo".ToCharArray());
Console.WriteLine(string.IsInterned(foo) != null); // true

我认为已经通过构造函数创建它会阻止字符串驻留。但即使使用 char[] 也会导致它被拘留。是什么原因或者是我的推理错误?

保留文字字符串。你的源代码中有文字 foo