Retrieving data from Thread Function using callback method in C sharp Arabic #89
Suggested Videos
❑ Retrieving data from Thread function using callback method.
Example
Main thread retrieves the target number from the user.
Main thread creates a child thread and pass the target number to the child thread.
The child thread computes the sum of the numbers and the returns the sum to the main thread using callback function.
The callback method prints the sum of numbers
Step 1: Create a callback delegate .The actual callback method signature should match with the signature of this delegate.
tep 2 : Create a helper class to compute the sum of numbers and to call the callback method
Step: This class consumes the number class created in Step 2.
Follow Us
If you want to download pptx : click Telegram