Buy Questpond's video subscriptions on
huge discount
.
Online: 11098
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
C#
>
Loading ...
How to call multiple methods at the same time
Posted by
Varaprasadm.84
under
C#
on 5/3/2012 |
Points: 10
| Views : 24156 | Status :
[Member]
| Replies : 9
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
Hi,
I am having 5 methods and the 5 methods contains the different data retrieval, now i want to call the 5 methods once instead of one after the another.
How can i achieve this?
Thanks in advance,
Prasad
Vara Prasad.M
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Varaprasadm.84
on: 5/3/2012
[Member]
Starter
|
Points: 25
0
How can i get using the methods? not the web services
Vara Prasad.M
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Varaprasadm.84
on: 5/3/2012
[Member]
Starter
|
Points: 25
0
One is pinging the system information
another is binding the server services
another is binding the data from the database
Vara Prasad.M
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Jmckamal
on: 5/3/2012
[Member]
Starter
|
Points: 25
0
Yes Its possible.
Step 1: Create a "sub procedure" by naming some X.
Step 2: Inside the sub procedure write whatever you want to do.
Step 3: Now in your main function write the below code using thread.
Dim <threadname> as New System.Threading.Thread(Addressof <Subprocedure name>)
Step 4: finally call that thread using start method by using syntax - <threadname>.start()
Step5: if you press f10 while running , when your code comes to line <threadname>.start() , all the methods which you wrote under sub function will run simultaneously, without any other invoke function.
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Varaprasadm.84
on: 5/30/2012
[Member]
Starter
|
Points: 25
0
Can i get the sample code using C#. And also i am using this scenario in the WEB Applications. Will it be possible???
Vara Prasad.M
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Kavi.Sirius
on: 5/30/2012
[Member]
Starter
|
Points: 25
0
hi
u can call the one method inside the another method
example:
method1();//call the method1() when u r need
inside the method1()
method1()
{
method2()//call the another method
}
....
like this u call the all 5 method in call at the same time
Regards
Kavi.n
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Varaprasadm.84
on: 5/30/2012
[Member]
Starter
|
Points: 25
0
By the above example after executing the first method only the second method will execute and after completion of second method the third method will execute.
My problem is to invoke all the three method asynchronously
Vara Prasad.M
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
donraza007-15388
on: 5/31/2012
[Member]
Starter
|
Points: 25
0
Then you should go for threading
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
donraza007-15388
on: 5/31/2012
[Member]
Starter
|
Points: 25
0
Thread t1 = new Thread(Method1);
Thread t2 = new Thread(Method2);
Thread t3 = new Thread(Method3);
t1.Start();
t2.Start();
t3.Start();
Method1()
{
}
Method2()
{
}
Method3()
{
}
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Varaprasadm.84
on: 6/13/2012
[Member]
Starter
|
Points: 25
0
Can you please explain how this threads will work?
The methods in the thread are not executing
Vara Prasad.M
Varaprasadm.84
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...