Udostępnij za pośrednictwem


'AddressOf' expression cannot be converted to '<typename>' because '<typename>' is not a delegate type

A statement attempts to convert an AddressOf expression to a type that is not a delegate type.

The AddressOf operator creates a procedure delegate instance that references a specific procedure. AddressOf can be used as the operand of a delegate constructor, or it can be used in a context in which the type of the delegate can be determined by the compiler.

Error ID: BC30581

To correct this error

  • Change the target type to a delegate type.

See Also

Concepts

Delegates and the AddressOf Operator

Reference

AddressOf Operator