Re: Threading on Functions returning values
- From: "A.K.Seerajdeen" <siraj@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 28 Jul 2007 12:31:12 +0530
Hi Mr.Peter,
Thank you for responding to my request of coding. I am very glad and happy
to add in this forum. People like you are very Important for this forum.
From the below code which you have send me I could able to solve my problem,Thank very much for this code. I hope I could also help others in the same
way like you did.
Thanking You,
With Regards,
A.K.Seerajdeen,
Emp ID: NGV33051,
Jr. Software Programmer,
Nanna Computers (Vizag),
Tel: +919885444639,
siraj@xxxxxxxxxxxxxxxxxxx
(This electronic message contains information from Nanna Computers, which
may be privileged or confidential. The information is for the intended
individual(s) or entity named above. If you are not the intended recipient
be aware that any copying, disclosing, distribution or use of the above
email and/or its attachments is prohibited and is illegal. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately. This e-mail is not
un-solicited e-mail under the relevant regulations.)
As an example:
delegate string MyDelegate();
void InvokingMethod()
{
string strT;
strT = (string)this.Invoke((MyDelegate)InvokedMethod);
}
string InvokedMethod()
{
return "This is a test string";
}
In other words, it works just like calling a method directly, in that when
the delegate returns a value, so too does the Invoke() method. Just cast
the return value from Invoke() to whatever you need, and as long as the
cast matches the actual return type of the invoked method, it will work
fine.
If the above does not solve the issue, I recommend that you read the MSDN
documentation on delegates as well as the Control.Invoke() method. If you
still have questions, please feel free to post them, but do make sure that
the questions are specific enough to be able to answered in a
straight-forward way. It would be especially useful if you phrase the
question in terms of what in the documentation you are having trouble
understanding.
Peter..
.
- References:
- Threading on Functions returning values
- From: A.K.Seerajdeen
- Re: Threading on Functions returning values
- From: ivar
- Re: Threading on Functions returning values
- From: Benny Skjold Tordrup
- Re: Threading on Functions returning values
- From: ivar
- Re: Threading on Functions returning values
- From: Peter Duniho
- Re: Threading on Functions returning values
- From: A.K.Seerajdeen
- Re: Threading on Functions returning values
- From: Peter Duniho
- Threading on Functions returning values
- Prev by Date: Re: [SOLUTION] You cannot install KB928366 (.Net Framework 1.1 securit
- Next by Date: gridview not displaying data
- Previous by thread: Re: Threading on Functions returning values
- Next by thread: Stream.BeginRead pointless?
- Index(es):
Relevant Pages
|