C# Goto Statement

In this chapter you will learn:

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

The goto statement is a jump statement that controls the execution of the program to another segment of the same program. You create label at anywhere in program then can pass the execution control via the goto statements.


Note: To terminate the program press Ctrl+C


Enter your name :
Welcome Steven
Press Ctrl + C for ExitEnter your name :
Welcome Clark
Press Ctrl + C for ExitEnter your name :
Steven Clark
Welcome Steven Clark
Press Ctrl + C for Exit

Enter your name : __


In this chapter, you learned what goto statement is in C# and how to use it in programming. In next chapter you will learn about break statement in C#.

One thought on “C# Goto Statement”

Leave a Reply

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