I ended up finding a solution. Instead of 
 
public override int GetHashCode()
{
    return key1 ^ key2;
}
 
I used 
 
public override int GetHashCode()
{
    return key1.GetHashCode() ^ key2.GetHashCode();
}
 
and it appears to work find so far..... Haven't taken it out for much of a 
test drive yet, but I'm getting there.
 
T
 

On Friday, April 13, 2012 9:11:12 AM UTC-5, Tony Dunsworth wrote:

> I have a feeling this has been answered before and if so, I would 
> appreciate it if someone would link to the discussion so I can work this 
> out.
>  
> I'm working on a standalone application and one of the tables I have to 
> use (I did not create theses tables.....) consists of a composite key. Ok, 
> no big deal, I have seen the documentation and I can make sense of it when 
> the columns are both ints. However, one of these columns is a string 
> (varchar2 Oracle 10g database) and that is gumming up the works in the 
> GetHashCode() override for obvious reasons.
>  
> Anyone else worked around this before me and is willing to point me toward 
> figuring it out? I would really appreciate it. If there is extra detail 
> needed, let me know and I can supply what I can.
>  
> Thanks a lot in advance for any help/direction. (Not asking you to solve 
> it for me, just show me where I need to go so I can figure it out)
>  
>  Cheers,
> Tony Dunsworth
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/castle-project-users/-/AH68jYm2R8cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to