Trouble comparing objects.

Aug 5, 2008 at 8:20 PM
Edited Aug 5, 2008 at 8:21 PM
Hallo the next code will return false

 

if (Role.FindById(1) == Role.FindById(1))

{

 

    return false;

}

 

else

{

 

    return true;

}

 


This makes it impossible to do Roles.Remove(role).

Is there a solution?

Kind Regards,
Jean van den Bogaard

 

 

 

Coordinator
Aug 6, 2008 at 10:28 AM
It's a problem and I'll fix it.
But the way to fix it may not change the comparing method, but change Rols.Remove(role) method.

Thanks.