String.Intern
has a special pool for strings which can later be retrieved.
Is there any way for me to know that the specified string was taken from the pool , and was NOt newly created ? example :
string s1 = "MyTest";
string s2 = new StringBuilder().Append("My").Append("Test").ToString();
string s3 = String.Intern(s2);
Console.WriteLine((Object)s2==(Object)s1); // Different references.
Console.WriteLine((Object)s3==(Object)s1); // The same reference.
s3 ref val was taken from the pool
is there any way for me to know it ?