[rdnzl-devel] C# pointer comparison.

Matthew O'Connor matthew.oconnor at calyptech.com
Tue Mar 25 23:03:24 UTC 2008


I am just beginning to discover the numerous different types of 
equals within Common Lisp so I can't comment on them. I can probably 
comment on the C# ones however.

I think that by default '==' will default to the 'Equals' function. 
In C# however you can overload the '==' operator and make it work 
differently. An example of this might be an primary key comparison 
on objects stored in a database table. So you make '==' look at 
the key slot and return true or false based on this equality.

So I think the short answer is for the default behaviour they are
exactly the same but you can overload the operator at which point
they will be different.

Cheers,

Matthew





More information about the rdnzl-devel mailing list