mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
class RedundantToString
|
||||
{
|
||||
public void M(object o)
|
||||
{
|
||||
Console.WriteLine(o.ToString()); // BAD
|
||||
Console.WriteLine(o); // GOOD
|
||||
|
||||
Console.WriteLine($"Hello: {o.ToString()}"); // BAD
|
||||
Console.WriteLine($"Hello: {o}"); // GOOD
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user