C# Return Statement

In this chapter you will learn:

  • What is the return statement in C#?
  • What is the functionality of return statement?
  • How to use return statement in programming?

A return statement is used for returning value to the caller from the called function. A easy example is mentioned below in a program that demonstrate the return statement very clearly.


  • In this example the variable result calls the function add() with two parameters and the function add() returns addition of both number to the result variable using return keyword.




    In this chapter you learned what return statement is in C# and how to use it in programming. In next chapter you will learn throw statement in C#.

    Leave a Reply

    Your email address will not be published. Required fields are marked *