I have a VB class that overloads the Not operator; this is not like using C # applications.
Public Shared Operator Not(item As MyClass) As Boolean Return False End Operator
I can use this in VB.NET:
If Not MyClassInstance Then ' Do something End If
I am trying to use this in a C # application, but it will not be created.
if (!MyClassInstance) { // do something }
I get an error
The operator '!' cannot be applied to an operand of type MyClass
Can someone tell me what I am missing?
english fool
source share