Continue For : Continue « Statements « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Statements » Continue 
4.14.2.Continue For
Option Strict On

Public Module ContinueStatement
   Public Sub Main()
      For ctr As Integer = to 100
         If ctr Mod Then
            Console.Write("{0} is odd", ctr)
         Else
            Console.WriteLine("{0} is even.", ctr)
            Continue For
         End If
         If ctr Mod Then
            Console.Write(" and it is divisible by 3")
         End If
         If ctr Mod Then
            Console.Write(" and it is divisible by 5")
         End If
         If ctr Mod Then
            Console.Write(" and it is divisible by 7")
         End If
         Console.WriteLine()
      Next
   End Sub
End Module
1 is odd
2 is even.
3 is odd and it is divisible by 3
4 is even.
5 is odd and it is divisible by 5
6 is even.
7 is odd and it is divisible by 7
8 is even.
9 is odd and it is divisible by 3
10 is even.
11 is odd
12 is even.
13 is odd
14 is even.
15 is odd and it is divisible by 3 and it is divisible by 5
16 is even.
17 is odd
18 is even.
19 is odd
20 is even.
21 is odd and it is divisible by 3 and it is divisible by 7
22 is even.
23 is odd
24 is even.
25 is odd and it is divisible by 5
26 is even.
27 is odd and it is divisible by 3
28 is even.
29 is odd
30 is even.
31 is odd
32 is even.
33 is odd and it is divisible by 3
34 is even.
35 is odd and it is divisible by 5 and it is divisible by 7
36 is even.
37 is odd
38 is even.
39 is odd and it is divisible by 3
40 is even.
41 is odd
42 is even.
43 is odd
44 is even.
45 is odd and it is divisible by 3 and it is divisible by 5
46 is even.
47 is odd
48 is even.
49 is odd and it is divisible by 7
50 is even.
51 is odd and it is divisible by 3
52 is even.
53 is odd
54 is even.
55 is odd and it is divisible by 5
56 is even.
57 is odd and it is divisible by 3
58 is even.
59 is odd
60 is even.
61 is odd
62 is even.
63 is odd and it is divisible by 3 and it is divisible by 7
64 is even.
65 is odd and it is divisible by 5
66 is even.
67 is odd
68 is even.
69 is odd and it is divisible by 3
70 is even.
71 is odd
72 is even.
73 is odd
74 is even.
75 is odd and it is divisible by 3 and it is divisible by 5
76 is even.
77 is odd and it is divisible by 7
78 is even.
79 is odd
80 is even.
81 is odd and it is divisible by 3
82 is even.
83 is odd
84 is even.
85 is odd and it is divisible by 5
86 is even.
87 is odd and it is divisible by 3
88 is even.
89 is odd
90 is even.
91 is odd and it is divisible by 7
92 is even.
93 is odd and it is divisible by 3
94 is even.
95 is odd and it is divisible by 5
96 is even.
97 is odd
98 is even.
99 is odd and it is divisible by 3
100 is even.
4.14.Continue
4.14.1.Continue Do
4.14.2.Continue For
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.