Visual Basic (.NET): Difference between revisions

Content deleted Content added
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 70:
</syntaxhighlight>
 
This is a module definition. Modules are a division of code, which can contain any kind of object, like constants or variables, functions or methods, or classes, but can't not be instantiated as objects like classes and cannot inherit from other modules. Modules serve as containers of code that can be referenced from other parts of a program.<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/aaxss7da(VS.80).aspx |title=Module Statement |publisher=MSDN – Developer Center |access-date=January 20, 2010 |archive-date=January 9, 2010 |archive-url=https://web.archive.org/web/20100109092122/http://msdn.microsoft.com/en-us/library/aaxss7da(VS.80).aspx |url-status=live }}</ref><br />It is common practice for a module and the code file which contains it to have the same name. However, this is not required, as a single code file may contain more than one module and/or class.
<syntaxhighlight lang="vbnet">
Sub Main()