Delegates and Classes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert

    Delegates and Classes

    I have a form that needs to be updated from a procedure in a class. I have a
    loop in the class that processes records. Each time a recored is processed,
    I need to update a textbox on the form. Can a delegate be used to pass back
    the data? What would be the best way to handle this? I tried to use a
    delegate but could not get the syntax correct>
    --
    Robert Hill

  • Das Bose

    #2
    RE: Delegates and Classes

    A delegate can do this, but I would recommend taking it one step furthing and
    creating an event that the form subscribed to. The event handler in the form
    would then update the text box with information that would be in the event
    args.

    "Robert" wrote:
    [color=blue]
    > I have a form that needs to be updated from a procedure in a class. I have a
    > loop in the class that processes records. Each time a recored is processed,
    > I need to update a textbox on the form. Can a delegate be used to pass back
    > the data? What would be the best way to handle this? I tried to use a
    > delegate but could not get the syntax correct>
    > --
    > Robert Hill
    >[/color]

    Comment

    Working...