>I want to check if argument left is null in the ==method. But if i do it
>like this
if(left == null)
that causes an infinite recursive call. So any suggestions on how to solve
this problem?
Cast to Object will prevent your operator overload to be called
if ((object)left == null)
Another way is to use Object.ReferenceEquals
if (Object.ReferenceEquals(left, null))
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
Please reply only to the newsgroup.