The code is constructing a delegate from a function, which is unnecessary. The function name by itself refers to a delegate.
To correct this error
-
Use the function name without parentheses to refer to a delegate.
JScript 8.0 |
JS1258: Delegates should not be explicitly constructed, simply use the method name |
See AlsoВ |
![]() |
The code is constructing a delegate from a function, which is unnecessary. The function name by itself refers to a delegate.
Use the function name without parentheses to refer to a delegate.