Hello!
I have a framework where all objects are uniquely identified by a GUID
(Global Unique Identifier). The objects are used in conjunction with lots of
hashtables and I was thinking, that overriding the GetHashCode base method
(inherited from object) was a good idea.
public abstract class CmsObjectNode : CmsObject, IXml
{
private Guid cmsObjectID = Guid.NewGuid();
public Guid CmsObjectID
{
get { return this.cmsObjectID; }
}
public override int GetHashCode()
{
return this.cmsObjectID.GetHashCode ();
}
}
Comments?
--
venlig hilsen / with regards
anders borum
--