Hi Raj,
Mattias has pointed out the problem in your code, i.e. you should modify
the parameter type from Ring to object.
The interface IEqualityCompar er is not generic. The generic version of this
interface is IEqualityCompar er<Tin System.Collecti ons.Generic namespace.
When implementing an interface, we could implement implicitly or
explicitly. An explicitly implemented member cannot be accessed through a
class instance, but only through an instance of the interface. When
implementing an interface implicitly, we add the modifier 'public' on the
implementation method; when implementing an interface explicitly, we
shouldn't add any modifier on the implementation method.
For more information on explicit interface implementation, you may read the
following MSDN document:
'Explicit Interface Implementation (C# Programming Guide)'
http://msdn2.microsoft.com/en-us/lib...57(VS.80).aspx
In fact, intellisense in VS05 provides an option to help you implement an
interface while working in the Code Editor. For more information how to do
this, please read the following document:
'How to: Implement Interface'
http://msdn2.microsoft.com/en-us/lib...1w(VS.80).aspx
At last, because Object class has a method called Equals, you'd better
implement the IEqualityCompar er interface explicitly to avoid the potential
confusion.
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.