Hi All
I'm new to .net framework and C#.I'm having an error in C#.Please help me
I have a class which overloaded = = and != operators as shown below
public class A
{
public static bool operator ==(A lhs,A rhs)
{
//Error checking here
if((null == lhs) || (null == rhs))
return false;
return lhs.Equals(rhs);
}
}
My code using this object is raising Stack Over flow exception as shown
below
A someA = new A();
if( someA == null)
{
//do some error handling thing here.
}
Thanks & Regards
Krishna