Hi, How do you think the following code? Is this good? If so, why it is? If not, why it is not? And how CLR see this code?
public abstract class EntityBase<TEntity> : IEquatable<TEntity>
{
public bool Equals(TEntity other)
{
// check equalitiy
}
// yes, below is object's Equals and GetHashCode method implementation
}
public class Person : EntityBase<Person>
{
}
I have a bit odd feeling on this. Like chicken and egg problem. And here is .Net framework code which has the same behaviour.
public sealed class String : IComparable<string>, IEquatable<string> // I removed other interfaces
Any thoughts?