mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
C#: Add a RedundantToStringCall test case.
This commit is contained in:
@@ -9,5 +9,8 @@ class RedundantToString
|
||||
|
||||
Console.WriteLine($"Hello: {o.ToString()}"); // BAD
|
||||
Console.WriteLine($"Hello: {o}"); // GOOD
|
||||
|
||||
Console.WriteLine("Hello: " + o.ToString()); // BAD
|
||||
Console.WriteLine("Hello: " + o); // GOOD
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user