Home > DeveloperSection > Interviews > What is the use of return statement?

Posted on    January-28-2014 10:36 PM

 C# C# 
 1 Answer(s)
  1222  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    January-28-2014 1:00 AM

 The return statement is associated with procedures (methods or functions). On executing the return statement, the system passes the control from the called procedure to the calling procedure. This return statement is used for two purposes :

  •        to return immediately to the caller of the currently executed code
  •         to return some value to the caller of the currently executed code.

Don't want to miss updates? Please click the below button!

Follow MindStick