Visual Basic .NET
Encyclopedia
Visual Basic .NET is an object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 computer programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 that can be viewed as an evolution of the classic Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...

 (VB), which is implemented on the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

. Microsoft currently supplies two major implementations of Visual Basic: Microsoft Visual Studio 2010, which is commercial software
Commercial software
Commercial software, or less commonly, payware, is computer software that is produced for sale or that serves commercial purposes.Commercial software is most often proprietary software, but free software packages may also be commercial software....

 and Visual Basic Express 2010, which is free of charge
Freeware
Freeware is computer software that is available for use at no cost or for an optional fee, but usually with one or more restricted usage rights. Freeware is in contrast to commercial software, which is typically sold for profit, but might be distributed for a business or commercial purpose in the...

.

Software and Hardware Requirements

Software Requirements

Visual Studio 2010 can be installed on the following operating systems:
  • Windows XP (x86) with Service Pack 3 - all editions except Starter Edition
  • Windows Vista (x86 & x64) with Service Pack 2 - all editions except Starter Edition
  • Windows 7 (x86 & x64)
  • Windows Server 2003 (x86 & x64) with Service Pack 2
  • Windows Server 2003 R2 (x86 & x64)
  • Windows Server 2008 (x86 & x64) with Service Pack 2
  • Windows Server 2008 R2 (x64)


Supported Architectures:
  • 32-Bit (x86)
  • 64-Bit (x64)

Hardware Requirements
  • Computer that has a 1.6GHz or faster processor
  • 1 GB (32 Bit) or 2 GB (64 Bit) RAM (Add 512 MB if running in a virtual machine)
  • 3GB of available hard disk space
  • DirectX 9 capable video card running at 1024 x 768 or higher-resolution display
  • DVD-ROM Drive

Visual Basic .NET (2002) (VB 7.0)

First version of Visual Basic .NET, which run on .NET framework 1.0. The most important feature is Managed code
Managed code
Managed code is a term coined by Microsoft to identify computer program code that requires and will only execute under the "management" of a Common Language Runtime virtual machine ....

, which contrasts with Visual Basic 6.0 and before.

Visual Basic .NET 2003 (VB 7.1)

Visual Basic .NET 2003 was released with version 1.1 of the .NET Framework. New features included support for the .NET Compact Framework
.NET Compact Framework
The Microsoft .NET Compact Framework is a version of the .NET Framework that is designed to run on resource constrained mobile/embedded devices such as personal digital assistants , mobile phones, factory controllers, set-top boxes, etc...

 and a better VB upgrade wizard
Wizard (software)
A software wizard or setup assistant is a user interface type that presents a user with a sequence of dialog boxes that lead the user through a series of well-defined steps. Tasks that are complex, infrequently performed, or unfamiliar may be easier to perform using a wizard...

. Improvements were also made to the performance and reliability of the .NET IDE (particularly the background compiler) and runtime. In addition, Visual Basic .NET 2003 was available in the Visual Studio.NET Academic Edition (VS03AE). VS03AE is distributed to a certain number of scholars from each country without cost.

Visual Basic 2005 (VB 8.0)

Visual Basic 2005 is the name used to refer to the Visual Basic .NET, Microsoft having decided to drop the .NET portion of the title.

For this release, Microsoft added many features, including:
  • Edit and Continue
  • Design-time expression evaluation.
  • The My pseudo-namespace
    Namespace (computer science)
    A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols . An identifier defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces...

     (overview, details), which provides:
    • easy access to certain areas of the .NET Framework that otherwise require significant code to access
    • dynamically-generated classes (notably My.Forms)
  • Improvements to the VB-to-VB.NET converter
  • The Using keyword, simplifying the use of objects that require the Dispose pattern
    Design pattern (computer science)
    In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that...

     to free resources
  • Just My Code, which when debugging hides (steps over) boilerplate code written by the Visual Studio .NET IDE and system library code
  • Data Source binding, easing database
    Database
    A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

     client/server development


The above functions (particularly My) are intended to reinforce Visual Basic .NET's focus as a rapid application development
Rapid application development
Rapid application development is a software development methodology that uses minimal planning in favor of rapid prototyping. The "planning" of software developed using RAD is interleaved with writing the software itself...

 platform and further differentiate it from C#.

Visual Basic 2005 introduced features meant to fill in the gaps between itself and other "more powerful" .NET languages, adding:
  • .NET 2.0 languages features such as:
    • generics
      Generic programming
      In a broad definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters...

    • Partial classes, a method of defining some parts of a class in one file and then adding more definitions later; particularly useful for integrating user code with auto-generated code
    • Nullable Types
      Nullable Types
      In programming, nullable types are a feature of some statically-typed programming languages which allows a data type to be set to the special value NULL instead of their common range of possible values....

  • Support for unsigned integer
    Integer (computer science)
    In computer science, an integer is a datum of integral data type, a data type which represents some finite subset of the mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values....

     data types commonly used in other languages

'IsNot' Operator Patent Application

One other feature of Visual Basic 2005 is the IsNot operator that makes 'If X IsNot Y' equivalent to 'If Not X Is Y, which gained notoriety when it was found to be the subject of a Microsoft patent application.

Visual Basic 2008 (VB 9.0)

Visual Basic 9.0 was released together with the Microsoft .NET Framework 3.5 on 19 November 2007.

For this release, Microsoft added many features, including:
  • A true conditional operator, "If(condition as boolean, truepart, falsepart)", to replace the "IIf" function.
  • Anonymous type
    Anonymous type
    Anonymous types are a feature of C# 3.0, Visual Basic .NET 9.0, and Oxygene that allows data types to encapsulate a set of properties into a single object without having to first explicitly define a type. This is an important feature for the SQL-like LINQ feature that is integrated into C# and VB.net...

    s
  • Support for LINQ
    LINQ
    Linq is a word-based card game from Endless Games, introduced at the American International Toy Fair in 2005.Game play requires at least four players, two of whom are dealt cards with the same word, while the others receive blanks. The goal is to gain points by correctly naming the players with...

  • Lambda expression
    Lambda expression
    Lambda expression may refer to:*Anonymous function*Lambda calculus#Definition...

    s
  • XML Literals
    XML Literals
    In the Microsoft .NET framework, XML Literal allows computer program to include XML directly in the code. It is currently only supported in VB.NET 9.0 and VB.NET 10.0. When Visual Basic expression is embedded in an XML literal, the application creates a LINQ to XML object for each literal at run...

  • Type Inference
    Type inference
    Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstruction....

  • Extension method
    Extension method
    An Extension method is a new language feature of C# starting with the 3.0 specification, as well as Visual Basic.NET starting with 9.0 and Oxygene with 2.0. Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying...

    s

Visual Basic 2010 (VB 10.0)

In April 2010, Microsoft released Visual Basic 2010. Microsoft had planned to use the Dynamic Language Runtime (DLR)
Dynamic Language Runtime
The Dynamic Language Runtime from Microsoft is an ongoing effort to bring a set of services that run on top of the Common Language Runtime and provides language services for several different dynamic languages...

 for that release but shifted to a co-evolution strategy between Visual Basic and sister language C# to bring both languages into closer parity with one another. Visual Basic's innate ability to interact dynamically with CLR and COM objects has been enhanced to work with dynamic languages built on the DLR such as IronPython
IronPython
IronPython is an implementation of the Python programming language targeting the .NET Framework and Mono. Jim Hugunin created the project and actively contributed to it up until Version 1.0 which was released on September 5, 2006. Thereafter, it was maintained by a small team at Microsoft until...

 and IronRuby
IronRuby
IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET framework. It is implemented on top of the Dynamic Language Runtime , a library running on top of the Common Language Infrastructure that provides dynamic typing and dynamic method dispatch, among other things,...

. The Visual Basic compiler was improved to infer line continuation in a set of common contexts, in many cases removing the need for the "_" line continuation character. Also, existing support of inline Functions was complemented with support for inline Subs as well as multi-line versions of both Sub and Function lambdas.

Relation to older versions of Visual Basic (VB6 and previous)

Whether Visual Basic .NET should be considered as just another version of Visual Basic or a completely different language is a topic of debate. This is not obvious, as once the methods that have been moved around and that can be automatically converted are accounted for, the basic syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....

 of the language has not seen many "breaking" changes, just additions to support new features like structured exception handling
Exception handling
Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution....

 and short-circuited expressions. Two important data type changes occurred with the move to VB.NET. Compared to VB6, the Integer data type
Data type
In computer programming, a data type is a classification identifying one of various types of data, such as floating-point, integer, or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of...

 has been doubled in length from 16 bits to 32 bits, and the Long data type
Data type
In computer programming, a data type is a classification identifying one of various types of data, such as floating-point, integer, or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of...

 has been doubled in length from 32 bits to 64 bits. This is true for all versions of VB.NET. A 16-bit integer in all versions of VB.NET is now known as a Short. Similarly, the Windows Forms
Windows Forms
Windows Forms is the name given to the graphical application programming interface included as a part of Microsoft .NET Framework, providing access to native Microsoft Windows interface elements by wrapping the extant Windows API in managed code...

 GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 editor is very similar in style and function to the Visual Basic form editor.

The version numbers used for the new Visual Basic (7, 7.1, 8, 9, ...) clearly imply that it is viewed by Microsoft as still essentially the same product as the old Visual Basic.

The things that have changed significantly are the semantics—from those of an object-based programming language running on a deterministic, reference-counted
Reference counting
In computer science, reference counting is a technique of storing the number of references, pointers, or handles to a resource such as an object, block of memory, disk space or other resource...

engine based on COM
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

 to a fully object-oriented language backed by the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

, which consists of a combination of the Common Language Runtime
Common Language Runtime
The Common Language Runtime is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs. In a process known as just-in-time compilation, the CLR compiles the intermediate language code known as CIL into the machine instructions...

 (a virtual machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...

 using generational garbage collection and a just-in-time compilation
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

 engine) and a far larger class library. The increased breadth of the latter is also a problem that VB developers have to deal with when coming to the language, although this is somewhat addressed by the My feature in Visual Studio 2005.

The changes have altered many underlying assumptions about the "right" thing to do with respect to performance and maintainability. Some functions and libraries no longer exist; others are available, but not as efficient as the "native" .NET alternatives. Even if they compile, most converted VB6 applications will require some level of refactoring
Refactoring
Code refactoring is "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior", undertaken in order to improve some of the nonfunctional attributes of the software....

 to take full advantage of the new language. Documentation is available to cover changes in the syntax, debugging applications, deployment and terminology.

Comparative samples

The following simple example demonstrates similarity in syntax between VB and VB.NET. Both examples pop up a message box saying "Hello, World" with an OK button.


Private Sub Command1_Click
MsgBox "Hello, World"
End Sub


A VB.NET example, MsgBox or the MessageBox class can be used:


Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Msgbox("Hello, World")
End Sub
End Class


Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show("Hello, World")
End Sub
End Class

  • Both Visual Basic 6 and Visual Basic .NET will automatically generate the Sub and End Sub statements when the corresponding button is clicked in design view. Visual Basic .NET will also generate the necessary Class and End Class statements. The developer need only add the statement to display the "Hello, World" message box.
  • All procedure calls must be made with parentheses in VB.NET, whereas in VB6 there were different conventions for functions (parentheses required) and subs (no parentheses allowed, unless called using the keyword Call).
  • The names Command1 and Button1 are not obligatory. However, these are default names for a command button in VB6 and VB.NET respectively.
  • In VB.NET, the Handles keyword is used to make the sub Button1_Click a handler for the Click event of the object Button1. In VB6, event handler subs must have a specific name consisting of the object's name ("Command1"), an underscore ("_"), and the event's name ("Click", hence "Command1_Click").
  • There is a function called MsgBox in the Microsoft.VisualBasic namespace which can be used similarly to the corresponding function in VB6. There is a controversy about which function to use as a best practice (not only restricted to showing message boxes but also regarding other features of the Microsoft.VisualBasic namespace). Some programmers prefer to do things "the .NET way", since the Framework classes have more features and are less language-specific. Others argue that using language-specific features makes code more readable (for example, using int (C#) or Integer (VB.NET) instead of System.Int32).
  • In VB 2008, the inclusion of ByVal sender as Object, ByVal e as EventArgs has become optional.


The following example demonstrates a difference between VB6 and VB.NET. Both examples close the active window
Active window
An active window is the currently focused window in the current window manager or explorer. Different window managers indicate the currently-active window in different ways and allow the user to switch between windows in different ways. For example, in Microsoft Windows, if both Notepad and...

.

Classic VB Example:


Sub cmdClose_Click
Unload Me
End Sub


A VB.NET example:


Sub btnClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnClose.Click
Me.Close
End Sub


The 'cmd' prefix is replaced by the 'btn' prefix, conforming to the new convention previously mentioned.

Visual Basic 6 did not provide common operator shortcuts. The following are equivalent:
VB6 Example:


Sub Timer1_Timer
Me.Height = Me.Height - 1
End Sub


VB.NET example:


Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
Me.Height -= 1
End Sub

Criticism

Long-time Visual Basic users have complained about Visual Basic .NET because initial versions dropped a large number of language constructs and user interface features that were available in VB6 (which is no longer sold by Microsoft), and changed the semantics of those that remained; for example, in VB.NET parameters are (by default) passed by value, not by reference. Detractors refer pejoratively to VB.NET as Visual Fred or DOTNOT. On 8 March 2005, a petition was set up in response to Microsoft's refusal to extend its mainstream support for VB6.

VB.NET's supporters state that the new language is in most respects more powerful than the original, incorporating modern object oriented programming paradigms in a more natural, coherent and complete manner than was possible with earlier versions. Opponents tend to respond that although VB6 has flaws in its object model, the cost in terms of redevelopment effort is too high for any benefits that might be gained by converting to VB.NET.

It is simpler to decompile
Decompiler
A decompiler is the name given to a computer program that performs, as far as possible, the reverse operation to that of a compiler. That is, it translates a file containing information at a relatively low level of abstraction into a form having a higher level of abstraction...

 languages that target Common Intermediate Language
Common Intermediate Language
Common Intermediate Language is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification and is used by the .NET Framework and Mono...

 (CIL), including VB.NET, compared to languages that compile to machine code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...

. Tools such as .NET Reflector
.NET Reflector
.NET Reflector is a proprietary software utility for Microsoft .NET combining class browsing, static analysis and decompilation, originally written by Lutz Roeder. MSDN Magazine named it as one of the Ten Must-Have utilities for developers, and Scott Hanselman listed it as part of his "Big Ten...

 can provide a close approximation to the original code due to the large amount of metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

 provided in CIL.

Microsoft supplies an automated VB6-to-VB.NET converter with Visual Studio .NET, which has improved over time, but it cannot convert all code, and almost all non-trivial programs will need some manual effort to compile. Most will need a significant level of code refactoring to work optimally. Visual Basic programs that are mainly algorithmic in nature can be migrated with few difficulties; those that rely heavily on such features as database support, graphics, unmanaged operations or on implementation details are more troublesome.

In addition, the required runtime libraries for VB6 programs are provided with Windows 98 SE and above, while VB.NET programs require the installation of the significantly larger .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

. The framework
Framework
Framework may refer to:*Software framework, a reusable set of libraries or classes for a software system .**Application framework, a software framework used to implement the standard structure of an application for a specific operating system....

 is included with Windows 7, Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

, Windows XP Media Center Edition
Windows XP Media Center Edition
Windows XP Media Center Edition is a version of the Windows XP operating system designed to serve as a home-entertainment hub. The last version, Windows XP Media Center Edition 2005, was released in October 2004.-Versions:...

, Windows XP Tablet PC Edition, Windows Server 2008 and Windows Server 2003
Windows Server 2003
Windows Server 2003 is a server operating system produced by Microsoft, introduced on 24 April 2003. An updated version, Windows Server 2003 R2, was released to manufacturing on 6 December 2005...

. For other supported operating systems such as Windows 2000
Windows 2000
Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

 or Windows XP (Home or Professional Editions)
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

, it must be separately installed.

Microsoft's response to developer dissatisfaction focused around making it easier to move new development and shift existing codebases from VB6 to VB.NET. An offering in 2005 was the VBRun website, offering code samples and articles for:
  • Using VB.NET to complete tasks that were common in VB6, like creating a print preview
  • Integrating VB6 and VB.NET solutions (dubbed VB Fusion)

Cross-platform and open-source development

The creation of open-source tools for VB.NET development have been slow compared to C#, although the Mono
Mono (software)
Mono, pronounced , is a free and open source project led by Xamarin to create an Ecma standard compliant .NET-compatible set of tools including, among others, a C# compiler and a Common Language Runtime....

 development platform provides an implementation of VB.NET-specific libraries and a VB.NET 8.0 compatible compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 written in VB.NET, as well as standard framework libraries such as Windows Forms
Windows Forms
Windows Forms is the name given to the graphical application programming interface included as a part of Microsoft .NET Framework, providing access to native Microsoft Windows interface elements by wrapping the extant Windows API in managed code...

 GUI library.

SharpDevelop
SharpDevelop
SharpDevelop is a free and open source integrated development environment for the Microsoft .NET, Mono, Gtk# and Glade# platforms, and supports development in C#, Visual Basic .NET, Boo, F#, IronPython and IronRuby programming languages.It was designed as a free and lightweight alternative to...

 and MonoDevelop
MonoDevelop
MonoDevelop is an open source integrated development environment for the Linux platform, Mac OS X, and Microsoft Windows, primarily targeted for the development of software that uses both the Mono and Microsoft .NET frameworks...

 are open-source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 alternative IDEs
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

.

Examples

The following is a very simple VB.NET program, a version of the classic "Hello world" example created as a console application:


Module Module1

Sub Main
Console.WriteLine("Hello, world!")
End Sub

End Module


The effect is to write the text Hello, world! to the command line. Each line serves a specific purpose, as follows:


Module Module1


This is a module definition, a division of code similar to a class
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

, although modules can contain classes. Modules serve as containers of code that can be referenced from other parts of a program.

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 definition.

Sub Main


This is the entry point where the program begins execution. Sub is an abbreviation of "subroutine."


Console.WriteLine("Hello, world!")


This line performs the actual task of writing the output. Console is a system object, representing a command-line interface
Command-line interface
A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks...

 and granting programmatic access to the operating system's standard streams
Standard streams
In Unix and Unix-like operating systems , as well as certain programming language interfaces, the standard streams are preconnected input and output channels between a computer program and its environment when it begins execution...

. The program calls the Console method WriteLine, which causes the string passed to it to be displayed on the console. Another common method is using MsgBox (a Message Box).

This piece of code is a solution to Floyd's Triangle
Floyd's triangle
Floyd's triangle is a right-angled triangular array of natural numbers, used in computer science education. It is named after Robert Floyd. It is defined by filling the rows of the triangle with consecutive numbers, starting with a 1 in the top left corner:1...

:

Imports System.Console

Module Program

Sub Main
Dim rows As Integer

' Input validation.
Do Until Integer.TryParse(ReadLine("Enter a value for how many rows to be displayed: "), rows) AndAlso rows >= 1
WriteLine("Allowed range is 1 and {0}", Integer.MaxValue)
Loop

' Output of Floyd's Triangle
Dim current = 1

For row = 1 To rows
For column = 1 To row
Write("{0,-2} ", current)
current += 1
Next

WriteLine
Next
End Sub


Shadows Console.ReadLine with a version which takes a prompt string.

Function ReadLine(Optional prompt As String = Nothing) As String
If prompt IsNot Nothing Then
Write(prompt)
End If

Return Console.ReadLine
End Function

End Module

See also

  • Microsoft Visual Studio Express
    Microsoft Visual Studio Express
    Microsoft Visual Studio Express is a set of freeware integrated development environments developed by Microsoft that are lightweight versions of the Microsoft Visual Studio product line. Express Editions were conceived beginning with Visual Studio 2005...

  • Comparison of C# and Visual Basic .NET
    Comparison of C sharp and Visual Basic .NET
    C# and Visual Basic .NET are the two primary languages used to program on the .NET Framework.-Language history:C# and VB.NET are syntactically very different languages with very different history...

  • Visual Basic for Applications
    Visual Basic for Applications
    Visual Basic for Applications is an implementation of Microsoft's event-driven programming language Visual Basic 6 and its associated integrated development environment , which are built into most Microsoft Office applications...

  • Comparison of programming languages
    Comparison of programming languages
    Programming languages are used for controlling the behavior of a machine . Like natural languages, programming languages conform to rules for syntax and semantics.There are thousands of programming languages and new ones are created every year...


Further reading



External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK