Files
codeql/csharp/ql/src/Useless code/FutileConditional.cs
2018-08-02 17:53:23 +01:00

20 lines
356 B
C#

class FutileConditional
{
static void Main(string[] args)
{
if (args.Length > 10) ; // BAD
if (args.Length > 8)
{
// BAD
}
if (args.Length > 6)
{
// GOOD: because of else-branch
}
else
{
System.Console.WriteLine("hello");
}
}
}