c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
c# .net

how to use goto statement in c#?

| | CSharp

The goto statement is a jump statement that controls the execution of the program to another segment of the same program.


 


int i = 0;
while (i < 10)
{
if (i == 5)
goto identifier;
}identifier:
MessageBox.Show(i);

 


output:
5