Home All Groups Group Topic Archive Search About

Events with return types

Author
10 Mar 2006 3:54 AM
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?

Author
10 Mar 2006 8:15 PM
tomb
ebustama***@xstratacoal.com wrote:

Show quoteHide quote
>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