- Version 7.0 (build 36138)
The following code is marked as a bug from sonarqube:
foreach (string str in stringsToIntern) string.Intern(str);
It says “Use the return value of method ‘Intern’, which has no side effect.”. Actually,
string.Intern does have a side-effect. It actually interns the string if it’s not interned already. Hence, this should not be marked as a bug.