explain synchronous and asynchronous in C#
Answers were Sorted based on User's Feedback
Answer / sharad yadav
Usually the methods are synchronous. That means that you
call them, they gets executed. And when they finish you get
the control back.
The asynchronous methods are different. You call them. They
start executing, but return the control over the execution
back to the thread which called them while they continue to
execute in different thread.
| Is This Answer Correct ? | 52 Yes | 8 No |
Answer / s sharma
Synchronous is one after another, so you send one email
when that process is done it sends the
next one. Asynchronous starts sending an email and it
doesn't care if the first one is done and will
start the second, and this goes on until all emails are
sent. Normally, an asynchronous process
would open a new thread and run in the background.
| Is This Answer Correct ? | 37 Yes | 3 No |
In simplest words, synchronous functions block the calling function until they complete their task. For instance, Thread.Sleep, Console.WriteLine and Console.ReadLine, these function do not let the control to shift to the next lines until they perform their functionality. Asynchronous methods are those methods which return immediately to the caller function and continue executing their task in parallel with the caller function. They do not block the caller function and it is due to this reason that they are called non-blocking functions
| Is This Answer Correct ? | 13 Yes | 1 No |
What is a multicast c# delegate?
Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?
Define method overloading in c#?
What is the use of partial methods?
What is the use of readkey in c#?
What is global asax in c#?
what is a static constructor?
what's the Difference between DataView and DataTable?
an object,class is value type or refarance type. ?
What is the use of console application in c#?
can it possible to acees the virthual method using the override method object? plz give me the example
Can properties be static in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)