VB.net中是否有等效的PHP __invoke()?
我会将对象称为方法,如下所示:
Public Class Testclass
Public Function MagicFunction( ByVal obj as object ) as Boolean
Trace.WriteLine( obj.toString() )
End Function
End Class
通话看起来像这样
Dim myTestObj = new Testclass()
myTestobj(1) 'should output: 1