How do I override GetHashCode in a general BaseClass
<p>There's a lot of information on the internet about how to override GetHashCode() when Equals is overriden. But, all these examples are about classes that contain a few fields that can generate a hash.
What I'm trying to find is a good GetHashCode implementation for a base class I use for all my business logica layer objects. This class, called BusinessLogica, contains a ToString() implementation, some basic functionality for my framework and the following Equals override:</p>

<pre><code>    public override bool Equals(object obj)
    {
        bool retValue;

        if (obj is BusinessLogica &amp;&amp; this.GetType() == obj.GetType())
        {
            retValue = this.ID == ((BusinessLogica)obj).ID;
        }
        else
        {
            retValue = false;
        }

        return retValue;
    }
</code></pre>

<p>Now, what I've done so far is when I need an object that extends this BusinessLogica and which I use as a key in a dictionary, I override GetHashCode in this particular class and return ID.
I could also use this implementation in the BusinessLogica baseclass. Is this 'safe'? I've also seen examples where ToString().GetHashCode() is returned.</p>

<p>What would be wise to use? Or is a GetHashCode on this level not usable and should I really override it in every of my BusinessLogica classes?</p>
