public override bool Equals(object obj) { if (obj is BaseObject) { return Ptr == (obj as BaseObject).Ptr; } return base.Equals(obj); }