Events with return types

  • Thread starter Thread starter ebustamante
  • Start date Start date
E

ebustamante

I am using a library provided by a software supplier. One of the
examples in the user's guide shows this:

A class level variable with events:
Private WithEvents EvalIterator As Evaluator

Evaluator is a class that exposes only one event.
This is the definiton of the event in Evaluator Class (found in the
object browser):

Public Event OnEvaluate(ByVal evaluator As SupplierLibrary.Evaluator)
As SupplierLibrary.Engine_Action

The example has this event handler:

Private Function EvalIterator_OnEvaluate(ByVal evaluator As Evaluator)
As Engine_Action Handles EvalIterator.OnEvaluate

'code goes here

Return Engine_Action.Continue
End Function

Question: I understood events can not have return types. How this
library could do it?
 
I am using a library provided by a software supplier. One of the
examples in the user's guide shows this:

A class level variable with events:
Private WithEvents EvalIterator As Evaluator

Evaluator is a class that exposes only one event.
This is the definiton of the event in Evaluator Class (found in the
object browser):

Public Event OnEvaluate(ByVal evaluator As SupplierLibrary.Evaluator)
As SupplierLibrary.Engine_Action

The example has this event handler:

Private Function EvalIterator_OnEvaluate(ByVal evaluator As Evaluator)
As Engine_Action Handles EvalIterator.OnEvaluate

'code goes here

Return Engine_Action.Continue
End Function

Question: I understood events can not have return types. How this
library could do it?
The SupplierLibrary is probably written in C#. There are no Sub()
procedures in C#, so they are all by default functions.

Tom
 
Back
Top