473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

MulticastDelegate return value

hi

how to capture return value of MulticastDelegate.

swp
Nov 16 '05 #1
3 2397
"SW Prathap" wrote:
how to capture return value of MulticastDelegate.


delegate int Handler();
//...
public event Handler Callback;
//...
foreach (Handler h in Callback.GetInvocationList())
{
int result = h();
//...
}
Nov 16 '05 #2
i tried what you said, but i am getting the return value of the last call only.
( i am binding the delegate with three methods , i want the return value of
all the three)
"MarkT" wrote:
"SW Prathap" wrote:
how to capture return value of MulticastDelegate.


delegate int Handler();
//...
public event Handler Callback;
//...
foreach (Handler h in Callback.GetInvocationList())
{
int result = h();
//...
}

Nov 16 '05 #3
i have tried it wrong, what you said worked,thanks MartT.

"SW Prathap" wrote:
i tried what you said, but i am getting the return value of the last call only.
( i am binding the delegate with three methods , i want the return value of
all the three)
"MarkT" wrote:
"SW Prathap" wrote:
how to capture return value of MulticastDelegate.


delegate int Handler();
//...
public event Handler Callback;
//...
foreach (Handler h in Callback.GetInvocationList())
{
int result = h();
//...
}

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nima | last post by:
The documentation for the Delegate and the MultiCastDelegate classes tell me that when we have a line like: public delegate void CheckAndPrintDelegate(string str); it causes the compiler to...
15
by: Nerox | last post by:
Hi, If i write: #include <stdio.h> int foo(int); int main(void){ int a = 3; foo(a); }
8
by: MB | last post by:
Hi, I got following : ' This delegate is declared as a void, so the compiler automatically ' generates a new class, named CheckAndPrintDelegate, that inherits from ' System.MulticastDelegate...
12
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport)...
3
by: tshad | last post by:
I am trying to set up a class to handle my database accesses. I can't seem to figure out how to get the return value from my dataReader from these routines (most of which I got elsewhere). They...
12
by: Michael Maes | last post by:
Hello, I have a BaseClass and many Classes which all inherit (directly) from the BaseClass. One of the functions in the BaseClass is to (de)serialize the (inherited) Class to/from disk. ...
20
by: lovecreatesbeauty | last post by:
Hello experts, Is the following code snippet legal? If it is, how can exit() do the keyword return a favor and give a return value to the main function? Can a function call (or only this...
6
KoreyAusTex
by: KoreyAusTex | last post by:
If anyone can help me figure out the what the missing return statements are, I think it might be the fact that I need to add a return false in the getValue()? import java.util.*; public class...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.