In C#, Jump statements are used to transfer control from one point to another point in the program due to some specified code while executing the program. There are five keywords in the Jump Statements:
The break statement is used to terminate the loop or statement in which it present. After that, the control will pass to the statements that present after the break statement, if available. If the break statement present in the nested loop, then it terminates only those loops which contains break statement.
This statement is used to skip over the execution part of the loop on a certain condition. After that, it transfers the control to the beginning of the loop. Basically, it skips its following statements and continues with the next iteration of the loop.
1 2 3 5 6 7 8 9 10
This statement is used to transfer control to the labeled statement in the program. The label is the valid identifier and placed just before the statement from where the control is transferred.
case 20 case 5
This statement terminates the execution of the method and returns the control to the calling method. It returns an optional value. If the type of method is void, then the return statement can be excluded.
The addition is 4
This is used to create an object of any valid exception class with the help of new keyword manually. The valid exception must be derived from the Exception class.
- Getting the Total Number of Days in a Month Using If-else and Switch Statements in C#
- How to Install and Setup Visual Studio for ASP.NET?
- C# | .NET Framework (Basic Architecture and Component Stack)
- C# | Boxing And Unboxing
- Difference between SortedList and SortedDictionary in C#
- C# | TrimStart() and TrimEnd() Method
- C# | Class and Object
- C# | Check if SortedSet and a specified collection share common elements
- C# | Check if HashSet and the specified collection contain the same elements
- C# | Check if a HashSet and a specified collection share common elements
- C# | Check if SortedSet and the specified collection contain the same elements
- Difference between Managed and Unmanaged code in .NET
- C# | Bitwise AND between the elements of BitArray
- C# | Add key and value into StringDictionary
- C# | Add the specified key and value into the ListDictionary
- C# | Adding the specified key and value into HybridDictionary
- C# | Add key and value into OrderedDictionary collection
- C# | Insert into OrderedDictionary with key and value at specified index
- C# | Nesting of try and catch blocks
- C# | Difference between Static Constructors and Non-Static Constructors
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : shubham_singh