Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic AnchorPoint equals (Read 2040 times)
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
AnchorPoint equals
Nov 17th, 2008 at 6:19pm
Print Post  
Hi,

When I try to do the following, "test" is false.

Code
Select All
AnchorPoint anchor1 = new .....
AnchorPoint clone = (AnchorPoint)anchor1.Clone();
bool test = anchor1.Equals(clone); 



Why? From my point of view, it should be true...

Thank you,
Marie
« Last Edit: Dec 9th, 2008 at 2:53pm by marie »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: AnchorPoint equals
Reply #1 - Nov 18th, 2008 at 6:11am
Print Post  
Hi Marie,

AnchorPoint does not override the Equals method, so that calls the Object.Equals implementation which compares just the references.

Stoyan
  
Back to top
 
IP Logged
 
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Re: AnchorPoint equals
Reply #2 - Nov 18th, 2008 at 2:05pm
Print Post  
Hi Stoyan,

Thanks for the answer. I'll just use a custom-made method than Wink.

Marie
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint