operator overloading !

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lakshmi

    operator overloading !

    thanks a lot Nicholas and Frank.[color=blue]
    >-----Original Message-----
    >I'm trying overload the logical negation operator !
    >public static bool operator !(long lVar)
    >{
    > if(lVar > 0)
    > return false;
    > else
    > return true;
    >}
    >
    >I'm getting the following error message:
    >The parameter of a unary operator must be the containing
    >type.
    >
    >Can any one help? Thanks.
    >.
    >[/color]
Working...