Files
codeql/csharp/ql/test/query-tests/Likely Bugs/HashedButNoHash/HashedButNoHash.cs
2021-07-01 16:09:11 +02:00

19 lines
344 B
C#

using System.Collections;
using System.Collections.Generic;
public class Test
{
public void M()
{
var h = new Hashtable();
h.Add(this, null); // BAD
var d = new Dictionary<Test, bool>();
d.Add(this, false); // BAD
}
public override bool Equals(object other)
{
return false;
}
}