_A.Equals(_B.GetType())
public class A
{
public int a;
public override bool Equals(object other)
{
if (other is null)
return false;
if (other.GetType() != typeof(A))
return false;
var otherA = (A)other;
return a == otherA.a;
}
}
public class B : A
{
public int b;
public override bool Equals(object other)
{
if (other is null)
return false;
if (other.GetType() != typeof(B))
return false;
var otherB = (B)other;
return base.a == otherB.a && this.b = otherB.b;
}
}
А ещё лучше, повторюсь, переходи на Линукс и настрой там syslog