mirror of
https://github.com/github/codeql.git
synced 2026-01-30 06:42:57 +01:00
20 lines
400 B
C#
20 lines
400 B
C#
class Person
|
|
{
|
|
private string name;
|
|
private int age;
|
|
public Person(string name, int age)
|
|
{
|
|
this.name = name;
|
|
this.age = age;
|
|
}
|
|
public override bool Equals(object obj)
|
|
{
|
|
Person personObj = obj as Person;
|
|
if (personObj == null)
|
|
{
|
|
return false;
|
|
}
|
|
return name == personObj.name && age == age; // BAD
|
|
}
|
|
}
|