![vb net 2010 console application restart vb net 2010 console application restart](https://i.ytimg.com/vi/cerzpMfe9lA/maxresdefault.jpg)
The Exit For statement is useful when you want to exit the loop in the middle of an iteration and not proceed with any further iterations. An example would be when you want to print the prime numbers from 1 to 100, the very first condition you would check is if the number is even and not 2 then you would not print the number and continue the next iteration of the loop.
![vb net 2010 console application restart vb net 2010 console application restart](https://bateaumobile.com/blogimgs/https/cip/cdn-images-1.medium.com/max/1600/1*Nw4iYLlTOauVjquhXSuN0A.png)
The Continue For statement is used when you don’t want an iteration of the loop to follow the same flow as other iterations. You can specify any numeric value in the step variable and the counter variable will be updated by that numeric value. The step variable is used to override the default increment/decrement value of 1. There are other optional elements in a VB. After each iteration, the value of the counter variable is updated by the compiler automatically. If the end expression results in false, the control exits the loop. If the end expression results in true, the control enters the loop body and statements are executed. It is then compared with the end expression.
![vb net 2010 console application restart vb net 2010 console application restart](https://www.thevbprogrammer.com/VB2010_03/03-07-ConsoleApps_files/image009.jpg)
The very first step is to initialize the counter variable with the start value. Let us understand the working of For Loop in VB.Net with the help of a flow chart.Ībove is a simple flow diagram of basic For Loop.
![vb net 2010 console application restart vb net 2010 console application restart](https://pferdewetten-online.net/pictures/vb-net-console-application-tutorial.jpg)
If not specified, the default value is 1. Step: Determines the value by which the counter variable is incremented or decremented after each iteration.If the value of the counter exceeds the end, the loop execution is terminated. Before each iteration, the current value of the counter variable is compared with the end expression. When the loop execution begins, the initial value of the counter variable is set by the start expression. start To end: The numeric expressions that denote the initial and final values of the counter variable.If the data type is not specified, it is inferred from the start, end and, step variables. Net to compare the value of the counter variable with the end expression in each iteration. As datatype: The data type of the counter variable.The value of this variable would determine when to exit the loop. counter: The variable that would be used as the control variable of the loop.For: The keyword that marks the beginning of the loop definition.Notice the number of jargon in the syntax! Worry not, we will understand each of them and their purpose in the syntax. SqlDataReader class is used for the MS-SQL database.Note: Bold denotes keywords. OleDBDataReaderclass is used for a database like an oracle and MS-Access. It is used to read or retrieve data from database to application. SqlDataAdapter class is used for the MS-SQL database. OleDBDataAdapter class is used for a database like an oracle and MS-Access. In the case of inserting, updating, or deleting data, it automatically updates the database while DataSet is updated.
VB NET 2010 CONSOLE APPLICATION RESTART UPDATE
It is used to retrieve data from the database and update DataSet. It contains a copy of the original database tables. SqlCommand class is used for the MS-SQL database. OleDBCommand class is used for a database like an oracle and MS-Access. It is used to execute a command (Query) like (Select * from Student). SqlConnection class is used for the MS-SQL database. OleDBConnectionclass is used for a database like an oracle and MS-Access. It is used for establishing a connection between database and application.