Visual Basic (.NET): Difference between revisions

Content deleted Content added
m Reverted 1 edit by 88.240.135.40 (talk) to last revision by 80.29.113.59
Syntax: Added the `While...End While Statement` to the list of loop structures. See: https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/while-end-while-statement
Line 41:
== Syntax ==
{{Expand section|date=April 2014}}
Visual Basic uses [[Statement (computer science)|statements]] to specify actions. The most common statement is an expression statement, consisting of an [[Expression (computer science)|expression]] to be evaluated, on a single line. As part of that evaluation, [[subroutine|functions or subroutines]] may be [[System call|called]] and [[Variable (programming)|variables]] may be [[assignment (computer science)|assigned]] new values. To modify the normal sequential execution of statements, Visual Basic provides several control-flow statements identified by reserved keywords. [[Structured programming]] is supported by several constructs including two conditional execution constructs (<code>If</code> ... <code>Then</code> ... <code>Else</code> ... <code>End If</code> and <code>Select Case</code> ... <code>Case</code> ... <code>End Select</code> ) and threefour iterative execution (loop) constructs (<code>Do</code> ... <code>Loop</code>, <code>For</code> ... <code>To</code>, and <code>For Each</code>, and <code>While</code> ... <code>End While</code>) . The <code>For</code> ... <code>To</code> statement has separate initialisation and testing sections, both of which must be present. (See examples below.) The <code>For Each</code> statement steps through each value in a list.
 
In addition, in Visual Basic: