Net-informations.com

What is the use of goto statement in C#

The goto statement transfers the program control directly to a labeled statement. The goto requires a label of operation. You create label at anywhere in program then can pass the execution control via the goto statements . It can be used to exit a deeply nested loop.

Using goto in if statement

Example

Using goto in while loop

Example










net-informations.com (C) 2019    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About