Code inspection: Redundant 'object.ToString()' callLast modified: 05 June 2024Category: Redundancies in CodeID: RedundantToStringCallEditorConfig: resharper_redundant_to_string_call_highlighting=[error|warning|suggestion|hint|none]Default severity: WarningLanguage: C#Requires SWA: NotipYou can suppress this inspection to ignore specific issues, change its severity level to make the issues less or more noticeable, or disable it altogether.This inspection reports redundant ToString() calls in two cases:When you call it on an object of type String.When you call it in an argument of a method that implicitly calls ToString() on the corresponding parameter.In both cases, the ToString() call is redundant and can be safely removed to improve readability.public void Test(object obj, string str, StringBuilder sb) { // 'str' is already of type 'String' Console.WriteLine(str.ToString()); // 'StringBuilder.Append' calls 'ToString()' internally sb.Append(obj.ToString()); }