<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FStatements%2FExit</id>
		<title>VB.Net Tutorial/Statements/Exit - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FStatements%2FExit"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Statements/Exit&amp;action=history"/>
		<updated>2026-04-06T01:10:59Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Statements/Exit&amp;diff=2991&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Statements/Exit&amp;diff=2991&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Statements/Exit&amp;diff=2992&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Statements/Exit&amp;diff=2992&amp;oldid=prev"/>
				<updated>2010-05-26T12:53:58Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Do Loop with Exit Do==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Option Strict On&lt;br /&gt;
 Imports System&lt;br /&gt;
 Module Module1&lt;br /&gt;
    Sub Main( )&lt;br /&gt;
       Dim counterVariable As Integer = 0&lt;br /&gt;
       Do&lt;br /&gt;
          Console.WriteLine(&amp;quot;counterVariable: {0}&amp;quot;, counterVariable)&lt;br /&gt;
          counterVariable = counterVariable + 1&lt;br /&gt;
          If counterVariable &amp;gt; 9 Then&lt;br /&gt;
             Exit Do&lt;br /&gt;
          End If&lt;br /&gt;
       Loop&lt;br /&gt;
    End Sub &amp;quot;Main&lt;br /&gt;
 End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;counterVariable: 0&lt;br /&gt;
counterVariable: 1&lt;br /&gt;
counterVariable: 2&lt;br /&gt;
counterVariable: 3&lt;br /&gt;
counterVariable: 4&lt;br /&gt;
counterVariable: 5&lt;br /&gt;
counterVariable: 6&lt;br /&gt;
counterVariable: 7&lt;br /&gt;
counterVariable: 8&lt;br /&gt;
counterVariable: 9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Exit For==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;public class Test&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Dim j As Integer&lt;br /&gt;
        For i As Integer = 1 To 3&lt;br /&gt;
            j = 0&lt;br /&gt;
            Do While j &amp;lt; 3&lt;br /&gt;
                j += 1&lt;br /&gt;
                For k As Integer = 1 To 3&lt;br /&gt;
                    Dim test1 As Boolean = k = 2&lt;br /&gt;
                    If test1 Then Exit For &amp;quot; Exits the For K loop.&lt;br /&gt;
                    Dim test2 As Boolean = i = j&lt;br /&gt;
                    If test2 Then Exit Do &amp;quot; Exits the Do.&lt;br /&gt;
                    Console.WriteLine(i &amp;amp; &amp;quot;, &amp;quot; &amp;amp; j &amp;amp; &amp;quot;, &amp;quot; &amp;amp; k)&lt;br /&gt;
                Next k&lt;br /&gt;
            Loop&lt;br /&gt;
        Next i&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;2, 1, 1&lt;br /&gt;
3, 1, 1&lt;br /&gt;
3, 2, 1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using the Exit keyword in repetition structures==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Module Tester&lt;br /&gt;
   Sub Main()&lt;br /&gt;
      Dim output As String&lt;br /&gt;
      Dim counter As Integer&lt;br /&gt;
      For counter = 1 To 10&lt;br /&gt;
         If counter = 3 Then&lt;br /&gt;
            Exit For&lt;br /&gt;
         End If&lt;br /&gt;
      Next&lt;br /&gt;
      output = &amp;quot;counter = &amp;quot; &amp;amp; counter &amp;amp; _&lt;br /&gt;
         &amp;quot; after exiting For/Next structure&amp;quot; &amp;amp; vbCrLf&lt;br /&gt;
      Do Until counter &amp;gt; 10&lt;br /&gt;
         If counter = 5 Then&lt;br /&gt;
            Exit Do&lt;br /&gt;
         End If&lt;br /&gt;
         counter += 1&lt;br /&gt;
      Loop&lt;br /&gt;
      output &amp;amp;= &amp;quot;counter = &amp;quot; &amp;amp; counter &amp;amp; _&lt;br /&gt;
         &amp;quot; after exiting Do Until/Loop structure&amp;quot; &amp;amp; vbCrLf&lt;br /&gt;
      While counter &amp;lt;= 10&lt;br /&gt;
         If counter = 7 Then&lt;br /&gt;
            Exit While&lt;br /&gt;
         End If&lt;br /&gt;
         counter += 1&lt;br /&gt;
      End While&lt;br /&gt;
      output &amp;amp;= &amp;quot;counter = &amp;quot; &amp;amp; counter &amp;amp; _&lt;br /&gt;
         &amp;quot; after exiting While structure&amp;quot;&lt;br /&gt;
      Console.WriteLine(output)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;counter = 3 after exiting For/Next structure&lt;br /&gt;
counter = 5 after exiting Do Until/Loop structure&lt;br /&gt;
counter = 7 after exiting While structure&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>