nanaxseed.blogg.se

Vb net 2010 sample projects
Vb net 2010 sample projects








vb net 2010 sample projects

You can compile a VB.Net program by using the command line instead of the Visual Studio IDE − A Command Prompt window appears that contains the line Hello World. The new project appears in Solution Explorer.Ĭlick the Run button or the F5 key to run the project. Specify a name and location for your project using the Browse button, and then choose the OK button. On the menu bar, choose File → New → Project. If you are using Visual Studio.Net IDE, take the following steps − This will prevent the screen from running and closing quickly when the program is launched from Visual Studio. The last line Console.ReadKey() is for the VS.NET Users. This statement causes the message "Hello, World!" to be displayed on the screen. The Main procedure specifies its behavior with the statementĬonsole.WriteLine("Hello World") WriteLine is a method of the Console class defined in the System namespace. The Main procedure states what the module or class will do when executed. The next line defines the Main procedure, which is the entry point for all VB.Net programs. The next line( 'This program) will be ignored by the compiler and it has been put to add additional comments in the program. A procedure could be any of the following − Procedures contain the executable code, or in other words, they define the behavior of the class. VB.Net is completely object oriented, so every program must contain a module of a class that contains the data and procedures that your program uses.Ĭlasses or Modules generally would contain more than one procedure. The next line has a Module declaration, the module Module1.

vb net 2010 sample projects vb net 2010 sample projects

The first line of the program Imports System is used to include the System namespace in the program. Let us look various parts of the above program −

#VB NET 2010 SAMPLE PROJECTS CODE#

When the above code is compiled and executed, it produces the following result −










Vb net 2010 sample projects